soujava / hazelcast-fuse61

JBOSS Fuse Working with Hazelcast 3.6
GNU General Public License v3.0
0 stars 0 forks source link

After updating to HZ 3.6-EA2, test CacheUnitTest fails with NumberFormatException #6

Open thomasmodeneis opened 8 years ago

thomasmodeneis commented 8 years ago

Steps to reproduce:

Change pom.xml HZ version from 3.5.3 to 3.6-EA2 and run clean install or execute CacheUnitTest with your favorite IDE.

Exception in detail:

RemoteTestNG starting
org.testng.TestNGException: 
Cannot instantiate class com.hazelcast.cache.CacheUnitTest
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:37)
    at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:372)
    at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:284)
    at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:109)
    at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:181)
    at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:120)
    at org.testng.TestRunner.initMethods(TestRunner.java:402)
    at org.testng.TestRunner.init(TestRunner.java:228)
    at org.testng.TestRunner.init(TestRunner.java:198)
    at org.testng.TestRunner.<init>(TestRunner.java:154)
    at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:141)
    at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:270)
    at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:561)
    at org.testng.SuiteRunner.init(SuiteRunner.java:156)
    at org.testng.SuiteRunner.<init>(SuiteRunner.java:110)
    at org.testng.TestNG.createSuiteRunner(TestNG.java:1235)
    at org.testng.TestNG.createSuiteRunners(TestNG.java:1222)
    at org.testng.TestNG.runSuitesLocally(TestNG.java:1074)
    at org.testng.TestNG.run(TestNG.java:999)
    at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
    at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:203)
    at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:174)
    at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:125)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:28)
    ... 27 more
Caused by: java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:454)
    at java.lang.Byte.parseByte(Byte.java:148)
    at java.lang.Byte.parseByte(Byte.java:174)
    at com.hazelcast.instance.BuildInfoProvider.getBuildInfo(BuildInfoProvider.java:67)
    at com.hazelcast.config.AbstractXmlConfigHelper.getReleaseVersion(AbstractXmlConfigHelper.java:210)
    at com.hazelcast.config.AbstractXmlConfigHelper.<init>(AbstractXmlConfigHelper.java:72)
    at com.hazelcast.config.AbstractConfigBuilder.<init>(AbstractConfigBuilder.java:60)
    at com.hazelcast.config.XmlConfigBuilder.<init>(XmlConfigBuilder.java:156)
    at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:109)
    at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:58)
    at com.hazelcast.cache.CacheUnitTest.<init>(CacheUnitTest.java:17)
    ... 32 more
RemoteTestNG finishing: -1458640147813 ms

Process finished with exit code 0
thomasmodeneis commented 8 years ago

This was fixed by adding:

hazelcast.version = 3.6-EA2
hazelcast.build = 20151125
hazelcast.distribution = Hazelcast
hazelcast.git.revision = 8af85c5
hazelcast.serialization.version = 1
thomasmodeneis commented 8 years ago

The I've got this one:

JBossFuse:karaf@root> Exception in thread "SpringOsgiExtenderThread-4" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'instance' defined in OSGi resource[classpath:/META-INF/spring/include/beans.xml|bnd.id=342|bnd.sym=com.hazelcast.api.hazelcast-endpoint]: Instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanDefinitionStoreException: Factory method [public static com.hazelcast.core.HazelcastInstance com.hazelcast.core.Hazelcast.newHazelcastInstance(com.hazelcast.config.Config)] threw exception; nested exception is java.lang.NoClassDefFoundError: javax/security/auth/callback/UnsupportedCallbackException
    at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:603)

Fixed by adding javax.security.auth.callback to the felix import instructions

thomasmodeneis commented 8 years ago

Then now there is a even more hairy one:

JBossFuse:karaf@root> Exception in thread "SpringOsgiExtenderThread-6" org.apache.camel.RuntimeCamelException: org.apache.camel.FailedToCreateRouteException: Failed to create route route2 at: >>> To[direct-vm:testHZ] <<< in route: Route(route2)[[From[jms:queue:startEndpoint]] -> [To[direct-... because of Failed to resolve endpoint: direct-vm://testHZ due to: Cannot auto create component: direct-vm
    at org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1363)
    at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:122)
    at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:317)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:96)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:334)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:948)
    at org.springframework.osgi.context.support.AbstractOsgiBundleApplicationContext.finishRefresh(AbstractOsgiBundleApplicationContext.java:235)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext$4.run(AbstractDelegatedExecutionApplicationContext.java:358)
    at org.springframework.osgi.util.internal.PrivilegedUtils.executeWithCustomTCCL(PrivilegedUtils.java:85)
    at org.springframework.osgi.context.support.AbstractDelegatedExecutionApplicationContext.completeRefresh(AbstractDelegatedExecutionApplicationContext.java:320)
    at org.springframework.osgi.extender.internal.dependencies.startup.DependencyWaiterApplicationContextExecutor$CompleteRefreshTask.run(DependencyWaiterApplicationContextExecutor.java:132)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route route2 at: >>> To[direct-vm:testHZ] <<< in route: Route(route2)[[From[jms:queue:startEndpoint]] -> [To[direct-... because of Failed to resolve endpoint: direct-vm://testHZ due to: Cannot auto create component: direct-vm
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:912)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:177)
    at org.apache.camel.impl.DefaultCamelContext.startRoute(DefaultCamelContext.java:778)
    at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:1959)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1709)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1583)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1551)
    at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:254)
    at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:120)
    ... 10 more
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: direct-vm://testHZ due to: Cannot auto create component: direct-vm
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:531)
    at org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:71)
    at org.apache.camel.model.RouteDefinition.resolveEndpoint(RouteDefinition.java:192)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:106)
    at org.apache.camel.impl.DefaultRouteContext.resolveEndpoint(DefaultRouteContext.java:112)
    at org.apache.camel.model.SendDefinition.resolveEndpoint(SendDefinition.java:61)
    at org.apache.camel.model.SendDefinition.createProcessor(SendDefinition.java:55)
    at org.apache.camel.model.ProcessorDefinition.makeProcessor(ProcessorDefinition.java:500)
    at org.apache.camel.model.ProcessorDefinition.addRoutes(ProcessorDefinition.java:213)
    at org.apache.camel.model.RouteDefinition.addRoutes(RouteDefinition.java:909)
    ... 19 more
Caused by: org.apache.camel.RuntimeCamelException: Cannot auto create component: direct-vm
    at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:361)
    at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:337)
    at org.apache.camel.impl.DefaultCamelContext.getEndpoint(DefaultCamelContext.java:501)
    ... 28 more
Caused by: java.lang.IllegalArgumentException: Invalid URI, no org.apache.camel.Component registered for scheme : direct-vm
    at org.apache.camel.impl.osgi.Activator$BaseResolver.createInstance(Activator.java:414)
    at org.apache.camel.impl.osgi.Activator$BaseResolver.createInstance(Activator.java:400)
    at org.apache.camel.impl.osgi.Activator$BundleComponentResolver.resolveComponent(Activator.java:195)
    at org.apache.camel.core.osgi.OsgiComponentResolver.getComponent(OsgiComponentResolver.java:76)
    at org.apache.camel.core.osgi.OsgiComponentResolver.resolveComponent(OsgiComponentResolver.java:64)
    at org.apache.camel.impl.DefaultCamelContext.getComponent(DefaultCamelContext.java:350)
    ... 30 more
Caused by: java.lang.ClassNotFoundException: org.apache.camel.component.directvm.DirectVmComponent not found by com.hazelcast.api.hazelcast-endpoint [343]
    at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1532)
    at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)
    at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:1955)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at org.apache.felix.framework.Felix.loadBundleClass(Felix.java:1870)
    at org.apache.felix.framework.BundleImpl.loadClass(BundleImpl.java:937)
    at org.apache.camel.impl.osgi.Activator$BaseResolver.createInstance(Activator.java:408)
    ... 35 more