ok so then we need to know the hierarchy of the libs in classloader, lib/ |- mongo `- eclipselinks webapps `- app `- WEB-INF `- lib |- ? `- ?
something like that best cause would be to have a github project we canreproduce doing mvn package tomee:run Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber <http://www.tomitribe.com> 2015-07-02 16:34 GMT+02:00 hwaastad <he...@waastad.org>: > Hi, > its tomee 1.7.2 plus > > using mongo-java-driver. > > I've also added: > openejb.force-unit-type=false > javax.persistence.provider = > org.eclipse.persistence.jpa.PersistenceProvider > > > stack: > > EL Severe]: 2015-07-02 > > 16:53:49.328--ServerSession(425178459)--Thread(Thread[http-apr-8080-exec-2,5,main])--java.lang.ClassCastException: > org.eclipse.persistence.nosql.adapters.mongo.MongoPlatform cannot be cast > to > org.eclipse.persistence.platform.database.DatabasePlatform > at > > org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.getPlatform(DatabaseSessionImpl.java:491) > at > > org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:730) > at > > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:205) > at > > org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:305) > at > > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337) > at > > org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:303) > at > > org.apache.openejb.assembler.classic.ReloadableEntityManagerFactory.createEntityManager(ReloadableEntityManagerFactory.java:145) > at > > no.datametrix.testdeleteprocess.producer.Resources.getEntityManager(Resources.java:42) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at > > org.apache.webbeans.inject.InjectableMethod.doInjection(InjectableMethod.java:155) > at > > org.apache.webbeans.portable.ProducerMethodProducer.produce(ProducerMethodProducer.java:110) > at > > org.apache.webbeans.portable.AbstractProducer.produce(AbstractProducer.java:182) > at > > org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:121) > at > > org.apache.webbeans.component.ProducerMethodBean.create(ProducerMethodBean.java:117) > at > > org.apache.webbeans.context.creational.BeanInstanceBag.create(BeanInstanceBag.java:76) > at > > org.apache.webbeans.context.AbstractContext.getInstance(AbstractContext.java:160) > at > org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:125) > at > > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:100) > at > > org.apache.webbeans.web.intercept.RequestScopedBeanInterceptorHandler.getContextualInstance(RequestScopedBeanInterceptorHandler.java:78) > at > > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:70) > at > > org.apache.webbeans.custom.persistence.EntityManager$$OwbNormalScopeProxy0.createQuery(javax/persistence/EntityManager.java) > at > > org.apache.deltaspike.data.impl.handler.EntityRepositoryHandler.findAll(EntityRepositoryHandler.java:135) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at > > org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:117) > at > > org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.invoke(DelegateQueryBuilder.java:97) > at > > org.apache.deltaspike.data.impl.builder.DelegateQueryBuilder.execute(DelegateQueryBuilder.java:57) > at > > org.apache.deltaspike.data.impl.builder.QueryBuilder.executeQuery(QueryBuilder.java:63) > at > > org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeNonTransactional(TransactionalQueryRunner.java:66) > at > > org.apache.deltaspike.data.impl.tx.TransactionalQueryRunner.executeQuery(TransactionalQueryRunner.java:61) > at > > org.apache.deltaspike.data.impl.handler.QueryHandler.invoke(QueryHandler.java:79) > at > > org.apache.deltaspike.proxy.impl.invocation.DelegateManualInvocationHandler.proceedOriginal(DelegateManualInvocationHandler.java:46) > at > > org.apache.deltaspike.proxy.impl.invocation.AbstractManualInvocationHandler.invoke(AbstractManualInvocationHandler.java:63) > at > > org.apache.deltaspike.proxy.impl.invocation.DelegateManualInvocationHandler.staticInvoke(DelegateManualInvocationHandler.java:39) > at > > no.datametrix.testdeleteprocess.repository.ZoneUserRepository$$DSPartialBeanProxy.findAll(Unknown > Source) > at > > no.datametrix.testdeleteprocess.controller.DeleteController.init(DeleteController.java:38) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at > > org.apache.webbeans.intercept.LifecycleInterceptorInvocationContext.proceed(LifecycleInterceptorInvocationContext.java:103) > at > > org.apache.webbeans.portable.InjectionTargetImpl.postConstruct(InjectionTargetImpl.java:301) > at > > org.apache.webbeans.component.AbstractOwbBean.create(AbstractOwbBean.java:126) > at > org.apache.webbeans.component.ManagedBean.create(ManagedBean.java:55) > at > > org.apache.webbeans.context.creational.BeanInstanceBag.create(BeanInstanceBag.java:76) > at > > org.apache.webbeans.context.AbstractContext.getInstance(AbstractContext.java:160) > at > org.apache.webbeans.context.AbstractContext.get(AbstractContext.java:125) > at > > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.getContextualInstance(NormalScopedBeanInterceptorHandler.java:100) > at > > org.apache.webbeans.intercept.NormalScopedBeanInterceptorHandler.get(NormalScopedBeanInterceptorHandler.java:70) > at > > no.datametrix.testdeleteprocess.controller.DeleteController$$OwbNormalScopeProxy0.getUsers(no/datametrix/testdeleteprocess/controller/DeleteController.java) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at javax.el.BeanELResolver.getValue(BeanELResolver.java:99) > at > javax.el.CompositeELResolver.getValue(CompositeELResolver.java:67) > at > > org.apache.myfaces.el.unified.resolver.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:179) > at org.apache.el.parser.AstValue.getValue(AstValue.java:183) > at > org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:184) > at > > org.apache.webbeans.el22.WrappedValueExpression.getValue(WrappedValueExpression.java:70) > at > > org.apache.myfaces.view.facelets.el.ContextAwareTagValueExpression.getValue(ContextAwareTagValueExpression.java:96) > at > javax.faces.component._DeltaStateHelper.eval(_DeltaStateHelper.java:249) > at javax.faces.component.UIData.getValue(UIData.java:2036) > at > org.primefaces.component.datatable.DataTable.getValue(DataTable.java:1002) > at > org.primefaces.component.api.UIData.getDataModel(UIData.java:629) > at org.primefaces.component.api.UIData.setRowModel(UIData.java:436) > at org.primefaces.component.api.UIData.setRowIndex(UIData.java:428) > at javax.faces.component.UIData.encodeEnd(UIData.java:1698) > at > javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:545) > at > javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:541) > at > javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:541) > at > javax.faces.component.UIComponentBase.encodeAll(UIComponentBase.java:541) > at > > org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.renderView(FaceletViewDeclarationLanguage.java:1981) > at > > org.apache.myfaces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:305) > at > > javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:59) > at > > org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:116) > at > org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:241) > at javax.faces.webapp.FacesServlet.service(FacesServlet.java:199) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at > org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) > at > > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) > at > > org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) > at > > org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) > at > > org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) > at > org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:44) > at > > org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) > at > > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170) > at > > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) > at > org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:957) > at > > org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423) > at > > org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079) > at > > org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:620) > at > > org.apache.tomcat.util.net.AprEndpoint$SocketWithOptionsProcessor.run(AprEndpoint.java:2413) > at > > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > at > > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > at > > org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) > at java.lang.Thread.run(Thread.java:745) > > > > -- > View this message in context: > http://tomee-openejb.979440.n4.nabble.com/Tomee-Mongodb-eclipselink-tp4675430p4675432.html > Sent from the TomEE Users mailing list archive at Nabble.com. >