I have defined a bean for Redis in my Document.xml.
<bean id="redisConfiguration" class="com.project.RedisConfiguration"/>
My tests are failing locally if I don't have a redis started, and in a pipeline the tests are failing due to the next errors:
java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:132
Caused by: org.springframework.beans.factory.BeanCreationException at BeanDefinitionValueResolver.java:342
Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1804
Caused by: org.hibernate.MappingException at PersisterFactoryImpl.java:123
Caused by: org.hibernate.HibernateException at EntityTuplizerFactory.java:91
Caused by: java.lang.reflect.InvocationTargetException at NativeConstructorAccessorImpl.java:-2
Caused by: java.lang.IllegalArgumentException at TypeCache.java:155
Caused by: java.lang.IllegalStateException at ClassInjector.java:1777
Caused by: java.lang.OutOfMemoryError
My guess is that RedisConfiguration is loaded via XML on the classpath explicitly.
How I can stop the spring env from requiring / getting a 'real' RedisConfig?
Related
While upgrading from 2.0.1 to 2.2.2.0 i am getting the below error
Caused by: org.apache.jasper.JasperException: org.apache.jasper.JasperException: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:475)
Caused by: org.owasp.esapi.errors.ConfigurationException: java.lang.reflect.InvocationTargetException Encoder class (org.owasp.esapi.reference.DefaultEncoder) CTOR threw exception.
at org.owasp.esapi.util.ObjFactory.make(ObjFactory.java:129)
at org.owasp.esapi.ESAPI.encoder(ESAPI.java:101)
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.owasp.esapi.logging.log4j.Log4JLogFactory
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.owasp.esapi.util.ObjFactory.loadClassByStringName(ObjFactory.java:158)
I changed the ESAPI.properties also with the new changes for Log4JLogFactory.
Please suggest as I am not able to proceed on this.
I have a Java EE 7 application that works flawlessly on Liberty 17.0.0.3 - both locally and when running on IBM Cloud.
But when I try to apply the same application on 17.0.0.4, I get the following error shown below. I see nothing in the release notes, that sheds any light on this problem, so any suggestions would be welcome.
Thanks..
[1/5/18 15:50:10:366 CET] 0000001a com.ibm.ejs.csi.EJBApplicationMetaData E CNTR0190E: The APIUserManager startup singleton session bean in the wfs-ejb-1.0.0-SNAPSHOT.jar module failed initialization with exception:
javax.ejb.NoSuchEJBException: An error occurred during initialization of singleton session bean wfs-ear#wfs-ejb-1.0.0-SNAPSHOT.jar#APIUserManager, resulting in the discarding of the singleton instance.; nested exception is: javax.ejb.EJBException: See nested exception; nested exception is: javax.persistence.PersistenceException: Exception [EclipseLink-23004] (Eclipse Persistence Services - 2.6.5.WAS-v20171031-22b68cc): org.eclipse.persistence.exceptions.TransactionException
Exception Description: Error obtaining the Transaction Manager
Internal Exception: java.lang.ClassNotFoundException: com.ibm.tx.jta.TransactionManagerFactory cannot be found by com.ibm.websphere.appserver.thirdparty.eclipselink_1.0.19.201712061545
at com.ibm.ejs.container.util.ExceptionUtil.NoSuchEJBException(ExceptionUtil.java:497)
at com.ibm.ejs.container.EJSHome.createSingletonBeanO(EJSHome.java:3754)
at com.ibm.ejs.csi.EJBApplicationMetaData.createStartupBeans(EJBApplicationMetaData.java:958)
at com.ibm.ejs.csi.EJBApplicationMetaData.startedModule(EJBApplicationMetaData.java:679)
at com.ibm.ws.ejbcontainer.osgi.internal.EJBRuntimeImpl.start(EJBRuntimeImpl.java:970)
at com.ibm.ws.ejbcontainer.osgi.internal.EJBModuleRuntimeContainerImpl.startModule(EJBModuleRuntimeContainerImpl.java:145)
at com.ibm.ws.app.manager.module.internal.ModuleHandlerBase.deployModule(ModuleHandlerBase.java:99)
at com.ibm.ws.app.manager.module.internal.DeployedModuleInfoImpl.installModule(DeployedModuleInfoImpl.java:49)
at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployModules(DeployedAppInfoBase.java:426)
at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployApp(DeployedAppInfoBase.java:412)
at com.ibm.ws.app.manager.ear.internal.EARApplicationHandlerImpl.install(EARApplicationHandlerImpl.java:76)
at com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:140)
at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1258)
at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.performAction(ApplicationStateMachineImpl.java:1106)
at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:881)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.ejb.EJBException: See nested exception; nested exception is: javax.persistence.PersistenceException: Exception [EclipseLink-23004] (Eclipse Persistence Services - 2.6.5.WAS-v20171031-22b68cc): org.eclipse.persistence.exceptions.TransactionException
Exception Description: Error obtaining the Transaction Manager
Internal Exception: java.lang.ClassNotFoundException: com.ibm.tx.jta.TransactionManagerFactory cannot be found by com.ibm.websphere.appserver.thirdparty.eclipselink_1.0.19.201712061545
at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:460)
at com.ibm.ejs.container.util.ExceptionUtil.EJBException(ExceptionUtil.java:336)
at com.ibm.ejs.container.BusinessExceptionMappingStrategy.mapException(BusinessExceptionMappingStrategy.java:347)
at com.ibm.ejs.container.BusinessExceptionMappingStrategy.setUncheckedException(BusinessExceptionMappingStrategy.java:519)
at com.ibm.ejs.container.EJSDeployedSupport.setUncheckedLocalException(EJSDeployedSupport.java:467)
at com.ibm.ejs.container.SingletonBeanO.callTransactionalLifecycleInterceptors(SingletonBeanO.java:239)
at com.ibm.ejs.container.SingletonBeanO.initialize(SingletonBeanO.java:329)
at com.ibm.ejs.container.BeanOFactory.create(BeanOFactory.java:103)
at com.ibm.ejs.container.EJSHome.createSingletonBeanO(EJSHome.java:3740)
... 16 more
Caused by: javax.persistence.PersistenceException: Exception [EclipseLink-23004] (Eclipse Persistence Services - 2.6.5.WAS-v20171031-22b68cc): org.eclipse.persistence.exceptions.TransactionException
Exception Description: Error obtaining the Transaction Manager
Internal Exception: java.lang.ClassNotFoundException: com.ibm.tx.jta.TransactionManagerFactory cannot be found by com.ibm.websphere.appserver.thirdparty.eclipselink_1.0.19.201712061545
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:839)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.getAbstractSession(EntityManagerFactoryDelegate.java:207)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryDelegate.createEntityManagerImpl(EntityManagerFactoryDelegate.java:307)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:337)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:318)
at com.ibm.ws.jpa.container.v21.internal.JPA21Runtime.createEntityManagerInstance(JPA21Runtime.java:110)
at com.ibm.ws.jpa.management.JPAEMPool.getEntityManager(JPAEMPool.java:155)
at com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(JPATxEntityManager.java:254)
at com.ibm.ws.jpa.management.JPATxEntityManager.getEMInvocationInfo(JPATxEntityManager.java:164)
at com.ibm.ws.jpa.management.JPAEntityManager.createNamedQuery(JPAEntityManager.java:586)
at com.navticon.sai.ejb.APIUserManager.reload(APIUserManager.java:83)
at com.navticon.sai.ejb.APIUserManager.postConstruct(APIUserManager.java:75)
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:498)
at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:205)
at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:642)
at com.ibm.ws.cdi.ejb.impl.InterceptorChain.proceed(InterceptorChain.java:119)
at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.invokeInterceptors(EJBCDIInterceptorWrapper.java:131)
at com.ibm.ws.cdi.ejb.impl.EJBCDIInterceptorWrapper.postConstruct(EJBCDIInterceptorWrapper.java:67)
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:498)
at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:200)
at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:631)
at org.jboss.weld.ejb.AbstractEJBRequestScopeActivationInterceptor.aroundInvoke(AbstractEJBRequestScopeActivationInterceptor.java:73)
at com.ibm.ws.cdi.ejb.interceptor.WeldSessionBeanInterceptorWrapper.aroundInvoke(WeldSessionBeanInterceptorWrapper.java:58)
at com.ibm.ws.cdi.ejb.interceptor.WeldSessionBeanInterceptorWrapper.postConstruct(WeldSessionBeanInterceptorWrapper.java:67)
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:498)
at com.ibm.ejs.container.interceptors.InterceptorProxy.invokeInterceptor(InterceptorProxy.java:200)
at com.ibm.ejs.container.interceptors.InvocationContextImpl.proceed(InvocationContextImpl.java:631)
at com.ibm.ejs.container.interceptors.InvocationContextImpl.doLifeCycle(InvocationContextImpl.java:335)
at com.ibm.ejs.container.SingletonBeanO.callTransactionalLifecycleInterceptors(SingletonBeanO.java:236)
... 19 more
Caused by: Exception [EclipseLink-23004] (Eclipse Persistence Services - 2.6.5.WAS-v20171031-22b68cc): org.eclipse.persistence.exceptions.TransactionException
Exception Description: Error obtaining the Transaction Manager
Internal Exception: java.lang.ClassNotFoundException: com.ibm.tx.jta.TransactionManagerFactory cannot be found by com.ibm.websphere.appserver.thirdparty.eclipselink_1.0.19.201712061545
at org.eclipse.persistence.exceptions.TransactionException.errorObtainingTransactionManager(TransactionException.java:125)
at org.eclipse.persistence.transaction.JTATransactionController.<init>(JTATransactionController.java:69)
at org.eclipse.persistence.transaction.was.WebSphereTransactionController.<init>(WebSphereTransactionController.java:46)
at org.eclipse.persistence.transaction.was.WebSphereLibertyTransactionController.<init>(WebSphereLibertyTransactionController.java:17)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.newInstanceFromClass(PrivilegedAccessHelper.java:517)
at org.eclipse.persistence.platform.server.ServerPlatformBase.initializeExternalTransactionController(ServerPlatformBase.java:309)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.preConnectDatasource(DatabaseSessionImpl.java:805)
at org.eclipse.persistence.internal.sessions.DatabaseSessionImpl.loginAndDetectDatasource(DatabaseSessionImpl.java:763)
at org.eclipse.persistence.internal.jpa.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:253)
at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:755)
... 56 more
Caused by: java.lang.ClassNotFoundException: com.ibm.tx.jta.TransactionManagerFactory cannot be found by com.ibm.websphere.appserver.thirdparty.eclipselink_1.0.19.201712061545
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:484)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:395)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:387)
at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:150)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:264)
at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:151)
at org.eclipse.persistence.transaction.was.WebSphereTransactionController.acquireTransactionManager(WebSphereTransactionController.java:84)
at org.eclipse.persistence.transaction.JTATransactionController.<init>(JTATransactionController.java:67)
... 69 more
It turned out to be a workarea that didn't get completely deleted when we installed version 17.0.0.4 - a running process locked the directory.
Everything seems to run smoothly on 17.0.0.4 now.
I am trying to run some tests with flapdoodle embedded mongodb that pass locally, but when I start the build on Jenkins it fails with the following error:
java.lang.IllegalStateException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.BeanCreationException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException
Caused by: org.springframework.beans.factory.BeanCreationException
Caused by: org.springframework.beans.BeanInstantiationException
Caused by: java.net.UnknownHostException
Caused by: java.net.UnknownHostException`
I am using gradle, my guess would be the versions, but I can't reproduce the error locally:
testCompile("de.flapdoodle.embed:de.flapdoodle.embed.mongo:2.0.0")
org.springframework.cloud:spring-cloud-dependencies:Dalston.SR2 and springBootVersion = '1.4.2.RELEASE'
Does anyone know why this is happening? Any advice on what can I do so the build on Jenkins passes?
I am Creating web-service using ADF JEE web application. When I was trying to access web-service it's throwing exception. I place mysql-connector-java-5.1.26-bin jar in my project class path and C:\Users\PC2\AppData\Roaming\JDeveloper\system11.1.2.4.39.64.36.1\DefaultDomain\lib also but it throwing exception like below.
Exception
EJB Exception: : java.lang.NoClassDefFoundError: com/mysql/jdbc/MySQLConnection
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:630)
at java.lang.ClassLoader.defineClass(ClassLoader.java:614)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at weblogic.utils.classloaders.GenericClassLoader.defineClass(GenericClassLoader.java:343)
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:302)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:270)
at java.lang.ClassLoader.loadClass(ClassLoader.java:305)
at java.lang.ClassLoader.loadClass(ClassLoader.java:246)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:179)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
Thank you
I Overcome from this exception Now another exception raised
Exception
javax.xml.soap.SOAPException: Unable to receive message. caused by:
java.io.IOException: null caused by: javax.xml.stream.XMLStreamException:
javax.xml.stream.XMLStreamException: Premature end of file encountered caused by:
javax.xml.stream.XMLStreamException: Premature end of file encountered
During startup of Glassfish I get the following failure. I do have the vbjorb.jar on the domain's classpath where the org.omg.CORBA.InterfaceDef resides.
SEVERE|glassfish3.1.2|javax.enterprise.system.tools.deployment.org.glassfish.deployment.common|_ThreadID=21;_ThreadName=Thread-2;|Exception while invoking class org.glassfish.ejb.startup.EjbDeployer load method
java.lang.RuntimeException: EJB Container initialization error
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:242)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:305)
... 32 more
Caused by: java.lang.RuntimeException: IIOP Protocol Manager initialization failed. Possible cause is that ORB is not available in this container
at com.sun.ejb.containers.BaseContainer.initializeProtocolManager(BaseContainer.java:827)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:508)
... 37 more
Caused by: java.lang.LinkageError: injection failed on class org.glassfish.enterprise.iiop.impl.POAProtocolMgr from org.apache.felix.framework.BundleWiringImpl#1545b48
at org.jvnet.hk2.component.InjectionManager$1.run(InjectionManager.java:259)
at java.security.AccessController.doPrivileged(Native Method)
... 49 more
Caused by: java.lang.NoClassDefFoundError: org/omg/CORBA/InterfaceDef
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.jvnet.hk2.component.InjectionManager.inject(InjectionManager.java:170)