2 Replies Latest reply on Dec 27, 2012 2:54 AM by Tuan Pham

    GateIn 3.5 update problem with unit test

    Tuan Pham Newbie

      Dear Team,

      I've project to base work on GateIn and now I move to update from 3.4.10 final to 3.5, I tried to look into the code and did some serveral changes ( dependencies, APIs, configuration .. )

      however after all I am facing unit test problem could not initialize could you give me some idea to fix that

       

      error log

       

      1975 [main] INFO exo.core.component.database.HibernateServiceImpl - Adding  Hibernate Mapping: org/exoplatform/services/organization/impl/UserImpl.hbm.xml

      1976 [main] ERROR exo.kernel.container.MX4JComponentAdapter - Failed to instanciate plugin add.hibernate.mapping for component org.exoplatform.services.database.impl.HibernateServiceImpl@7a8eae04: null

      java.security.PrivilegedActionException: java.lang.reflect.InvocationTargetException

                at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedExceptionAction(SecurityHelper.java:318)

                at org.exoplatform.container.jmx.MX4JComponentAdapter.addComponentPlugin(MX4JComponentAdapter.java:169)

                at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:114)

                at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

                at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:468)

                at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstanceOfType(ConcurrentPicoContainer.java:422)

                at org.exoplatform.container.CachingContainer.getComponentInstanceOfType(CachingContainer.java:139)

                at org.exoplatform.container.ExoContainer.createComponent(ExoContainer.java:411)

                at org.exoplatform.container.jmx.MX4JComponentAdapter.getComponentInstance(MX4JComponentAdapter.java:97)

                at org.exoplatform.container.management.ManageableComponentAdapter.getComponentInstance(ManageableComponentAdapter.java:68)

                at org.exoplatform.container.ConcurrentPicoContainer.getInstance(ConcurrentPicoContainer.java:468)

                at org.exoplatform.container.ConcurrentPicoContainer.getComponentInstancesOfType(ConcurrentPicoContainer.java:366)

                at org.exoplatform.container.CachingContainer.getComponentInstancesOfType(CachingContainer.java:111)

                at org.exoplatform.container.LifecycleVisitor.visitContainer(LifecycleVisitor.java:151)

                at org.exoplatform.container.ConcurrentPicoContainer.accept(ConcurrentPicoContainer.java:615)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.picocontainer.defaults.AbstractPicoVisitor.traverse(AbstractPicoVisitor.java:32)

                at org.exoplatform.container.LifecycleVisitor.traverse(LifecycleVisitor.java:90)

                at org.exoplatform.container.LifecycleVisitor.start(LifecycleVisitor.java:170)

                at org.exoplatform.container.ConcurrentPicoContainer.start(ConcurrentPicoContainer.java:554)

                at org.exoplatform.container.ExoContainer.start(ExoContainer.java:269)

                at org.exoplatform.container.StandaloneContainer$3.run(StandaloneContainer.java:178)

                at org.exoplatform.container.StandaloneContainer$3.run(StandaloneContainer.java:175)

                at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedAction(SecurityHelper.java:290)

                at org.exoplatform.container.StandaloneContainer.getInstance(StandaloneContainer.java:174)

                at org.exoplatform.container.StandaloneContainer.getInstance(StandaloneContainer.java:117)

                at org.exoplatform.calendar.service.test.BaseCalendarTestCase.initContainer(BaseCalendarTestCase.java:121)

                at org.exoplatform.calendar.service.test.BaseCalendarTestCase.init(BaseCalendarTestCase.java:62)

                at org.exoplatform.calendar.service.test.BaseCalendarTestCase.<init>(BaseCalendarTestCase.java:67)

                at org.exoplatform.calendar.service.test.TestCalendarService.<init>(TestCalendarService.java:76)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)

                at junit.framework.TestSuite.createTest(TestSuite.java:63)

                at junit.framework.TestSuite.addTestMethod(TestSuite.java:310)

                at junit.framework.TestSuite.addTestsFromTestCase(TestSuite.java:153)

                at junit.framework.TestSuite.<init>(TestSuite.java:132)

                at org.junit.internal.runners.JUnit38ClassRunner.<init>(JUnit38ClassRunner.java:72)

                at org.junit.internal.builders.JUnit3Builder.runnerForClass(JUnit3Builder.java:11)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

                at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)

                at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)

                at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:26)

                at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:250)

                at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)

                at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)

                at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)

                at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)

                at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)

                at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

      Caused by: java.lang.reflect.InvocationTargetException

                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

                at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

                at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

                at java.lang.reflect.Method.invoke(Method.java:597)

                at org.exoplatform.container.jmx.MX4JComponentAdapter$1.run(MX4JComponentAdapter.java:173)

                at org.exoplatform.container.jmx.MX4JComponentAdapter$1.run(MX4JComponentAdapter.java:170)

                at org.exoplatform.commons.utils.SecurityHelper.doPrivilegedExceptionAction(SecurityHelper.java:310)

                ... 58 more

      Caused by: java.lang.NullPointerException

                at org.hibernate.cfg.Configuration.addURL(Configuration.java:631)

                at org.exoplatform.services.database.impl.HibernateServiceImpl.addPlugin(HibernateServiceImpl.java:121)

                ... 65 more

      1980 [main] INFO exo.core.component.database.HibernateServiceImpl - Adding  Hibernate Mapping: org/exoplatform/services/organization/impl/MembershipImpl.hbm.xml

      1980 [main] ERROR exo.kernel.container.MX4JComponentAdapter - Failed to instanciate plugin add.hibernate.mapping for component org.exoplatform.services.database.impl.HibernateServiceImpl@7a8eae04: null

       

       

      do I miss any configuration at all ? my branch source are there https://github.com/exodev/calendar/tree/feature/upgrade-gatein35

      and my test services defined there https://github.com/exodev/calendar/tree/feature/upgrade-gatein35/calendar-service/src/test