|
As of October 27th, please open all new issues in the Red Hat Customer Portal . |
|
[
Permlink
| « Hide
]
Pat Fox added a comment - 19/Jul/12 09:25 AM
test case attached - DEV_4305_testcase.tar
To replicate issue using test case.
Setup Fuse ESB to use security: install org.apache.felix.framework.security version 1.4.2 using following command in Fuse ESB shell: osgi:install mvn:org.apache.felix/org.apache.felix.framework.security/1.4.2 Note: it will work it the above bundle is only in a resolve state. create an "all.policy" with the following contents grant {
permission java.security.AllPermission;
};
shutdown Fuse ESB process. Export the following environment variable and then run ."/servicemix" in the same shell export JAVA_OPTS="-Djava.security.policy=<LOCATION_OF_POLICY_FILE>all.policy -Dorg.osgi.framework.security="osgi" -Dorg.osgi.framework.trust.repositories="<TEST_CASE_DIR>/DEV-4305/truststore.jks"" Build and sign bundle In .../DEV-4305/DEV-4305-ArrayIndexOutOfBoundsExcpetion/ run mvn install in .../DEV-4305/ take a copy of the jar and sign it cp DEV-4305-ArrayIndexOutOfBoundsExcpetion/target/DEV-4305-ArrayIndexOutOfBoundsExcpetion-1.0-SNAPSHOT.jar . jarsigner -keystore keystore.jks -storepass password DEV-4305-ArrayIndexOutOfBoundsExcpetion-1.0-SNAPSHOT.jar selfsigned NOTE: I have include a test cert to sign the jar in the test case. Deploy the Bundle In the Fuse ESB console, try to deploy the singed bundle using the following command osgi:install file:<TEST_CASE_DIR>/DEV-4305/DEV-4305-ArrayIndexOutOfBoundsExcpetion-1.0-SNAPSHOT.jar This should result in the following output java.lang.ArrayIndexOutOfBoundsException: -1 karaf@root> Workaround Add a dummy file to ".../DEV-4305/DEV-4305-ArrayIndexOutOfBoundsExcpetion/src/main/resources" directory and repeat the Build and sign bundle & Deploy the Bundle steps. I raised https://issues.apache.org/jira/browse/FELIX-3603
Once this one is fixed, we need to check what happens with an empty bundle (i.e. no resources other than META-INF/xxx files), but given those are not signed, I think the bundle won't be even considered as a signed bundle anymore, so this Exception should go away. The exception now seems fixed with the changes in https://issues.apache.org/jira/browse/FELIX-3603
Fixed in 4.4 and 7.0 branches
|
||||||||||||||||||||||||||||||||||||||||||||||