12:50:30,311 ERROR [stderr] (http--127.0.0.1-8080-1) java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver from [Module "deployment.santosh.war:main" from Service Module Loader]
12:50:30,311 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:191)
12:50:30,311 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:358)
12:50:30,312 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:330)
12:50:30,312 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:307)
12:50:30,312 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:101)
12:50:30,312 ERROR [stderr] (http--127.0.0.1-8080-1) at java.lang.Class.forName0(Native Method)
12:50:30,313 ERROR [stderr] (http--127.0.0.1-8080-1) at java.lang.Class.forName(Unknown Source)
12:50:30,313 ERROR [stderr] (http--127.0.0.1-8080-1) at com.cluster.action.CheckServlet2.doGet(CheckServlet2.java:43)
12:50:30,313 ERROR [stderr] (http--127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
12:50:30,313 ERROR [stderr] (http--127.0.0.1-8080-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
12:50:30,313 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
12:50:30,314 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
12:50:30,314 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
12:50:30,314 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
12:50:30,314 ERROR [stderr] (http--127.0.0.1-8080-1) at org.jboss.as.web.NamingValve.invoke(NamingValve.java:57)
12:50:30,314 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:154)
12:50:30,315 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
12:50:30,315 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
12:50:30,315 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
12:50:30,315 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
12:50:30,316 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:667)
12:50:30,316 ERROR [stderr] (http--127.0.0.1-8080-1) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
12:50:30,316 ERROR [stderr] (http--127.0.0.1-8080-1) at java.lang.Thread.run(Unknown Source)
That is because you dont have that ojdbc.jar in your classpath. Get it from here add it to your classpath
Related
Exception in thread "main" java.lang.ClassNotFoundException: LdaCourtApplication
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:466)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:566)
at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:46)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
In our Server we are using scheduler to perform a particular tasks. There are already many scheduler running on the server which are working smoothly and Perfrorming DB Operations without any hurdle. But in below case due to some weird issues, I am getting the following exception:
00:01:01,322 WARN [com.zaxxer.hikari.proxy.ConnectionProxy] (schedulerFactoryBean_Worker-4) Connection oracle.jdbc.driver.T4CConnection#98b70f9 (springHikariCP) marked as broken because of SQLSTATE(08006), ErrorCode(17002).
00:01:01,326 ERROR [stderr] (schedulerFactoryBean_Worker-4) java.sql.SQLRecoverableException: Io exception: Socket read timed out
00:01:01,327 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:101)
00:01:01,328 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:133)
00:01:01,329 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:199)
00:01:01,331 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
00:01:01,332 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:521)
00:01:01,333 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:791)
00:01:01,333 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.T4CStatement.executeMaybeDescribe(T4CStatement.java:855)
00:01:01,334 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1186)
00:01:01,334 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1377)
00:01:01,335 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:387)
00:01:01,335 ERROR [stderr] (schedulerFactoryBean_Worker-4) at com.zaxxer.hikari.proxy.StatementProxy.executeQuery(StatementProxy.java:99)
00:01:01,336 ERROR [stderr] (schedulerFactoryBean_Worker-4) at com.zaxxer.hikari.proxy.StatementJavassistProxy.executeQuery(StatementJavassistProxy.java)
00:01:01,336 ERROR [stderr] (schedulerFactoryBean_Worker-4) at com.inov8.microbank.server.dao.stakeholdermodule.hibernate.StakeholderBankInfoHibernateDAO.getStakeholderBankInfoModelList(StakeholderBankInfoHibernateDAO.java:130)
00:01:01,337 ERROR [stderr] (schedulerFactoryBean_Worker-4) at com.inov8.microbank.server.service.stakeholdermodule.StakeholderBankInfoManagerImpl.getStakeholderBankInfoModelList(StakeholderBankInfoManagerImpl.java:258)
00:01:01,338 ERROR [stderr] (schedulerFactoryBean_Worker-4) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
00:01:01,339 ERROR [stderr] (schedulerFactoryBean_Worker-4) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
00:01:01,339 ERROR [stderr] (schedulerFactoryBean_Worker-4) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
00:01:01,340 ERROR [stderr] (schedulerFactoryBean_Worker-4) at java.lang.reflect.Method.invoke(Method.java:606)
00:01:01,340 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
00:01:01,341 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
00:01:01,343 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
00:01:01,344 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
00:01:01,345 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
00:01:01,346 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
00:01:01,346 ERROR [stderr] (schedulerFactoryBean_Worker-4) at com.sun.proxy.$Proxy78.getStakeholderBankInfoModelList(Unknown Source)
00:01:01,347 ERROR [stderr] (schedulerFactoryBean_Worker-4) at com.inov8.microbank.server.service.dailyjob.FundTransferScheduler.getStakeholderBankInfoModelList(FundTransferScheduler.java:587)
00:01:01,348 ERROR [stderr] (schedulerFactoryBean_Worker-4) at com.inov8.microbank.server.service.dailyjob.FundTransferScheduler.executeInternal(FundTransferScheduler.java:93)
00:01:01,348 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113)
00:01:01,349 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
00:01:01,349 ERROR [stderr] (schedulerFactoryBean_Worker-4) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
00:01:01,350 ERROR [stderr] (schedulerFactoryBean_Worker-4) Caused by: oracle.net.ns.NetException: Socket read timed out
00:01:01,351 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.net.ns.Packet.receive(Packet.java:249)
00:01:01,351 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.net.ns.DataPacket.receive(DataPacket.java:92)
00:01:01,352 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:172)
00:01:01,353 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.net.ns.NetInputStream.read(NetInputStream.java:117)
00:01:01,354 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.net.ns.NetInputStream.read(NetInputStream.java:92)
00:01:01,355 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.net.ns.NetInputStream.read(NetInputStream.java:77)
00:01:01,356 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1034)
00:01:01,357 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1010)
00:01:01,357 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:588)
00:01:01,358 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:183)
00:01:01,359 ERROR [stderr] (schedulerFactoryBean_Worker-4) at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:780)
00:01:01,359 ERROR [stderr] (schedulerFactoryBean_Worker-4) ... 24 more
00:01:01,363 INFO [stdout] (schedulerFactoryBean_Worker-4) ERROR [schedulerFactoryBean_Worker-4] | *******>>>ERROR MESSAGE<<<*******
00:01:01,364 INFO [stdout] (schedulerFactoryBean_Worker-4) Hibernate flushing: Cannot release connection; uncategorized SQLException for SQL [???]; SQL state [99999]; error code [17008]; Closed Connection; nested exception is java.sql.SQLException: Closed Connection
00:01:01,365 ERROR [org.quartz.core.JobRunShell] (schedulerFactoryBean_Worker-4) Job DEFAULT.Funds Transfer threw an unhandled Exception: : java.lang.RuntimeException: Unable to load Stakeholder bank info list
at com.inov8.microbank.server.service.dailyjob.FundTransferScheduler.executeInternal(FundTransferScheduler.java:97) [classes:]
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:113) [spring-context-support-3.1.1.RELEASE.jar:3.1.1.RELEASE]
at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:]
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:]
Here is my HikariCp Configurations:
<bean id="dataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
<constructor-arg index="0">
<bean id="hikariConfig" class="com.zaxxer.hikari.HikariConfig">
<property name="poolName" value="springHikariCP" />
<property name="minimumIdle" value="5"/>
<property name="maximumPoolSize" value="5"/>
<property name="transactionIsolation" value="TRANSACTION_READ_COMMITTED"/>
<property name="connectionTestQuery" value="select 1 from dual" />
<!-- <property name="connectionInitSql" value="begin
dbms_output.put_line('CALL nothing; DECIMALS=0');
end;" />-->
<property name="initializationFailFast" value="false"/>
<property name="idleTimeout" value="30000"/>
<property name="dataSource" ref="oracleDataSource"/>
</bean>
</constructor-arg>
</bean>
<bean id="oracleDataSource" class="oracle.jdbc.pool.OracleDataSource">
<property name="user" value="${datasource.username}"/>
<property name="password" value="${datasource.password}"/>
<property name="URL" value="${datasource.url}"/>
<property name="connectionProperties">
<props>
<prop key="oracle.jdbc.ReadTimeout">120000</prop><!--In Milliseconds-->
</props>
</property>
</bean>
I am not able to get a precise answer after searching it for hours so that's why I am now asking at Stack Overflow.
There was a database lock(TABLE) created by Spring Cloud Task called "TASK_LOCK". It has to be clean and should release all locks before exit.
In my case, there was an ERROR before WARN statement telling - Failed to process #BeforeTask or #AfterTask annotation because: Task with name "scheduler" is already running.
I had the same issue, issue was due to the wrong column name mapping in the #entity class. After fixing the column name mapping in Entity, issue got resolved.
Make sure if you are performing any CRUD (DEL,UPD,INS) operations in the DB through sqlDeveloper or mysqlworkbench Commit those changes in sqldeveloper and, then run the application. It will work fine. It worked for me.
Also make sure the object is mapped properly to the table.
I experienced a similar issue during application startup, my problem was mistakenly removing Oracle JDBC driver in the pom.
Reapplying ojdbc dependency resolved the problem
<!-- https://mvnrepository.com/artifact/com.oracle.jdbc/ojdbc8 -->
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>19.3.0.0</version>
</dependency>
I'm experiencing an odd OutOfMemoryError when deploying OSGi/Blueprint bundles in JBoss AS 7.2. Some of my bundles cause this error if they are present in the deployment directory when I start JBoss - but only in combination with each other.
In my current setup I have four bundles - let's call them A, B, C and D. A and B depends on C and D but not on each other, and they all use various external libraries which I have also deployed. If C and D are deployed with exactly one of A and B when JBoss starts, everything seems to deploy fine, but if both A and B are present I get the following stack trace:
16:42:30 ERROR [org.jboss.msc.service.fail] MSC00001: Failed to start service jbosgi.PersistentBundles.RESOLVE: org.jboss.msc.service.StartException in service jbosgi.PersistentBundles.RESOLVE: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [rt.jar:1.6.0_45]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [rt.jar:1.6.0_45]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_45]
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.lang.String.substring(String.java:1939) [rt.jar:1.6.0_45]
at java.util.StringTokenizer.nextToken(StringTokenizer.java:335) [rt.jar:1.6.0_45]
at org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:911)
at org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:957)
at org.apache.felix.resolver.ResolverImpl.mergeUses(ResolverImpl.java:957)
at org.apache.felix.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:696)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:188)
at org.jboss.osgi.resolver.felix.StatelessResolver.resolve(StatelessResolver.java:56)
at org.jboss.osgi.framework.internal.ResolverImpl.resolveAndApply(ResolverImpl.java:137)
at org.jboss.osgi.framework.internal.PackageAdminImpl.resolveBundles(PackageAdminImpl.java:366)
at org.jboss.osgi.framework.spi.BootstrapBundlesResolve.start(BootstrapBundlesResolve.java:127)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA.jar:1.0.4.GA]
... 3 more
16:42:30 ERROR [stderr] java.lang.OutOfMemoryError: Java heap space
16:42:30 ERROR [stderr] at java.util.LinkedList.listIterator(LinkedList.java:667)
16:42:30 ERROR [stderr] at java.util.AbstractList.listIterator(AbstractList.java:284)
16:42:30 ERROR [stderr] at java.util.AbstractSequentialList.iterator(AbstractSequentialList.java:222)
16:42:30 ERROR [stderr] at org.jboss.sun.net.httpserver.ServerImpl$ServerTimerTask.run(ServerImpl.java:849)
16:42:30 ERROR [stderr] at java.util.TimerThread.mainLoop(Timer.java:512)
16:42:30 ERROR [stderr] at java.util.TimerThread.run(Timer.java:462)
and a little later
16:42:40 INFO [org.jboss.as.controller] JBAS014774: Service status report
JBAS014775: New missing/unsatisfied dependencies:
service jbosgi.PersistentBundles.COMPLETE (missing) dependents: [service jboss.deployment.unit."com.springsource.org.jgroups-2.2.8.jar".CONFIGURE_MODULE, service jboss.deployment.unit."com.springsource.org.aopalliance-1.0.0.jar".CONFIGURE_MODULE, service jboss.deployment.unit."com.springsource.org.objectweb.asm-1.5.3.jar".CONFIGURE_MODULE, service jboss.deployment.unit."com.springsource.org.hibernate-3.3.1.GA.jar".CONFIGURE_MODULE, JBAS014799: ... and 54 more ]
JBAS014777: Services which failed to start: service jbosgi.PersistentBundles.RESOLVE: org.jboss.msc.service.StartException in service jbosgi.PersistentBundles.RESOLVE: Failed to start service
(all the libraries listed here are previously listed as deployed successfully, although I haven't been able to check wich the "54 more" are, and if they're all present)
I'm completely at a loss here. What could cause this behavior? Where do I start troubleshooting?
Error Log
11:24:27,620 WARNING [org.springframework.beans.GenericTypeAwarePropertyDescriptor] (MSC service thread 1-1) Invalid JavaBean property 'serviceBeans' being accessed! Ambiguous write methods found next to actually used [public void org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setServiceBeans(java.lang.Object[])]: [public void org.apache.cxf.jaxrs.JAXRSServerFactoryBean.setServiceBeans(java.util.List)]
11:24:27,764 ERROR [stderr] (MSC service thread 1-1) org.apache.cxf.BusException: No binding factory for namespace http://apache.org/cxf/binding/jaxrs registered.
11:24:27,768 ERROR [stderr] (MSC service thread 1-1) at org.apache.cxf.binding.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:91)
11:24:27,772 ERROR [stderr] (MSC service thread 1-1) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createBindingInfo(AbstractJAXRSFactoryBean.java:136)
11:24:27,776 ERROR [stderr] (MSC service thread 1-1) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpointInfo(AbstractJAXRSFactoryBean.java:116)
11:24:27,779 ERROR [stderr] (MSC service thread 1-1) at org.apache.cxf.jaxrs.AbstractJAXRSFactoryBean.createEndpoint(AbstractJAXRSFactoryBean.java:162)
11:24:27,783 ERROR [stderr] (MSC service thread 1-1) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:83)
11:24:27,786 ERROR [stderr] (MSC service thread 1-1) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
11:24:27,792 ERROR [stderr] (MSC service thread 1-1) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
11:24:27,795 ERROR [stderr] (MSC service thread 1-1) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
11:24:27,798 ERROR [stderr] (MSC service thread 1-1) at java.lang.reflect.Method.invoke(Method.java:597)
11:24:27,800 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
11:24:27,804 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
11:24:27,808 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
11:24:27,813 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
11:24:27,816 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
11:24:27,820 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
11:24:27,823 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
11:24:27,827 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
11:24:27,831 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
11:24:27,833 ERROR [stderr] (MSC service thread 1-1) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563)
11:24:27,836 ERROR [stderr] (MSC service thread 1-1) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872)
11:24:27,840 ERROR [stderr] (MSC service thread 1-1) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423)
11:24:27,843 ERROR [stderr] (MSC service thread 1-1) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
11:24:27,845 ERROR [stderr] (MSC service thread 1-1) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
11:24:27,847 ERROR [stderr] (MSC service thread 1-1) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
11:24:27,851 ERROR [stderr] (MSC service thread 1-1) at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368)
11:24:27,853 ERROR [stderr] (MSC service thread 1-1) at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821)
11:24:27,855 ERROR [stderr] (MSC service thread 1-1) at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70)
11:24:27,857 ERROR [stderr] (MSC service thread 1-1) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
11:24:27,859 ERROR [stderr] (MSC service thread 1-1) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
11:24:27,860 ERROR [stderr] (MSC service thread 1-1) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
11:24:27,862 ERROR [stderr] (MSC service thread 1-1) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
11:24:27,865 ERROR [stderr] (MSC service thread 1-1) at java.lang.Thread.run(Thread.java:619)
11:24:27,877 INFO [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-1) Setting the server's publish address to be /
11:24:27,902 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] (MSC service thread 1-1) Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory#6ac18c: defining beans [cxf,org.apache.cxf.bus.spring.BusApplicationListener,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.configuration.Configurer,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.endpoint.ServiceContractResolverRegistry,org.apache.cxf.transport.servlet.ServletTransportFactory,jacksonProvider,myService,serviceImpl,org.springframework.security.filterChains,org.springframework.security.filterChainProxy,org.springframework.security.web.PortMapperImpl#0,org.springframework.security.web.PortResolverImpl#0,org.springframework.security.config.authentication.AuthenticationManagerFactoryBean#0,org.springframework.security.authentication.ProviderManager#0,org.springframework.security.web.context.HttpSessionSecurityContextRepository#0,org.springframework.security.web.authentication.session.SessionFixationProtectionStrategy#0,org.springframework.security.web.savedrequest.HttpSessionRequestCache#0,org.springframework.security.access.vote.AffirmativeBased#0,org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0,org.springframework.security.web.access.DefaultWebInvocationPrivilegeEvaluator#0,org.springframework.security.authentication.AnonymousAuthenticationProvider#0,org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint#0,org.springframework.security.userDetailsServiceFactory,org.springframework.security.web.DefaultSecurityFilterChain#0,org.springframework.security.provisioning.InMemoryUserDetailsManager#0,org.springframework.security.authentication.dao.DaoAuthenticationProvider#0,org.springframework.security.authentication.DefaultAuthenticationEventPublisher#0,org.springframework.security.authenticationManager]; root of factory hierarchy
11:24:27,933 SEVERE [org.springframework.web.context.ContextLoader] (MSC service thread 1-1) Context initialization failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myService': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872) [spring-context-3.0.2.RELEASE.jar:]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423) [spring-context-3.0.2.RELEASE.jar:]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.2.RELEASE.jar:]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.2.RELEASE.jar:]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.2.RELEASE.jar:]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_18]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_18]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_18]
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:112) [cxf-bundle-2.2.3.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_18]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_18]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_18]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_18]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409) [spring-beans-3.0.2.RELEASE.jar:]
... 20 more
Caused by: java.lang.NullPointerException
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:122) [cxf-bundle-2.2.3.jar:]
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:103) [cxf-bundle-2.2.3.jar:]
... 27 more
11:24:28,007 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jaxws]] (MSC service thread 1-1) Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myService': Invocation of init method failed; nested exception is org.apache.cxf.service.factory.ServiceConstructionException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1412) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:872) [spring-context-3.0.2.RELEASE.jar:]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:423) [spring-context-3.0.2.RELEASE.jar:]
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276) [spring-web-3.0.2.RELEASE.jar:]
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197) [spring-web-3.0.2.RELEASE.jar:]
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47) [spring-web-3.0.2.RELEASE.jar:]
at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:3368) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.apache.catalina.core.StandardContext.start(StandardContext.java:3821) [jbossweb-7.0.1.Final.jar:7.0.2.Final]
at org.jboss.as.web.deployment.WebDeploymentService.start(WebDeploymentService.java:70) [jboss-as-web-7.0.2.Final.jar:7.0.2.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_18]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_18]
at java.lang.Thread.run(Thread.java:619) [:1.6.0_18]
Caused by: org.apache.cxf.service.factory.ServiceConstructionException
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:112) [cxf-bundle-2.2.3.jar:]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_18]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_18]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_18]
at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_18]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) [spring-beans-3.0.2.RELEASE.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409) [spring-beans-3.0.2.RELEASE.jar:]
... 20 more
Caused by: java.lang.NullPointerException
at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:122) [cxf-bundle-2.2.3.jar:]
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:103) [cxf-bundle-2.2.3.jar:]
... 27 more
11:24:28,117 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Error listenerStart
11:24:28,119 ERROR [org.apache.catalina.core.StandardContext] (MSC service thread 1-1) Context [/jaxws] startup failed due to previous errors
11:24:28,131 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/jaxws]] (MSC service thread 1-1) Closing Spring root WebApplicationContext
11:24:28,137 INFO [org.jboss.web] (MSC service thread 1-1) registering web context: /jaxws
11:24:28,141 ERROR [org.jboss.as] (MSC service thread 1-1) JBoss AS 7.0.2.Final "Arc" started (with errors) in 22181ms - Started 224 of 284 services (3 services failed or missing dependencies, 57 services are passive or on-demand)
11:24:28,199 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "jaxws.war"
Bean.xml
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxrs="http://cxf.apache.org/jaxrs"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxrs
http://cxf.apache.org/schemas/jaxrs.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.1.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<!-- define the jackson provider for JAXB/JSON support -->
<bean id="jacksonProvider" class="org.codehaus.jackson.jaxrs.JacksonJaxbJsonProvider" />
<jaxrs:server id="myService" address="/">
<jaxrs:serviceBeans>
<ref bean="serviceImpl" />
</jaxrs:serviceBeans>
<jaxrs:providers>
<ref bean='jacksonProvider' />
</jaxrs:providers>
</jaxrs:server>
<bean id="serviceImpl" class="com.rs.UserServiceImpl" />
<security:http>
<security:http-basic></security:http-basic>
<security:intercept-url pattern="/**" access="ROLE_USER" />
</security:http>
<security:authentication-manager alias="authenticationManager">
<security:authentication-provider>
<security:user-service>
<security:user name="bob" password="bobspassword" authorities="ROLE_USER" />
</security:user-service>
</security:authentication-provider>
</security:authentication-manager>
</beans>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>cxf</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>WEB-INF/beans.xml</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>
<servlet>
<servlet-name>cxf</servlet-name>
<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>cxf</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
I am working on apache cxf and developing a rest web service example
I got above error in my program. Also posted bean.xml and web.xml
Please help regarding the error, I am using maven and spring I just want to authenticate a user.
Your main error is
org.apache.cxf.BusException: No binding factory for namespace http://apache.org/cxf/binding/jaxrs registered.
This related question might help you find a solution:
CXF JAX-RS is causing BusException
While trying to intialize the ConnectionFactory from a jobScheduler (running in jboss-5), to websphere queue, I get the below exception
java.lang.VerifyError: Cannot inherit from final class
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:67)
at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:633)
at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:592)
at java.security.AccessController.doPrivileged(Native Method)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:591)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:568)
at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:135)
at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:455)
at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:267)
at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:166)
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:276)
at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1138)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:862)
at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:502)
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:447)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseIiopUrl(WsnInitCtxFactory.java:1781)
at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1525)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:389)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at com.test.testBatch.jms.JMSUtil.initialize(JMSUtil.java:57)
at com.test.testBatch.jms.JMSUtil.send(JMSUtil.java:90)
at com.test.testBatch.job.OutboundChangesPollingJob.execute(OutboundChangesPollingJob.java:76)
at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
2012-03-29 09:47:11,775 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) Exception in thread "DefaultQuartzScheduler_Worker-0"
2012-03-29 09:47:11,776 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) java.lang.NoClassDefFoundError: com/ibm/rmi/corba/NamedValueImpl
2012-03-29 09:47:11,777 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.ibm.ws.naming.util.WsnInitCtxFactory.parseIiopUrl(WsnInitCtxFactory.java:1781)
2012-03-29 09:47:11,777 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1525)
2012-03-29 09:47:11,777 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:389)
2012-03-29 09:47:11,777 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113)
2012-03-29 09:47:11,777 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428)
2012-03-29 09:47:11,777 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:144)
2012-03-29 09:47:11,778 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at javax.naming.InitialContext.lookup(InitialContext.java:392)
2012-03-29 09:47:11,778 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.test.testBatch.jms.JMSUtil.initialize(JMSUtil.java:57)
2012-03-29 09:47:11,778 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.test.testBatch.jms.JMSUtil.send(JMSUtil.java:90)
2012-03-29 09:47:11,778 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at com.test.testBatch.job.OutboundChangesPollingJob.execute(OutboundChangesPollingJob.java:76)
2012-03-29 09:47:11,778 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.quartz.core.JobRunShell.run(JobRunShell.java:195)
2012-03-29 09:47:11,778 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520)
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) Caused by: java.lang.ClassNotFoundException: Unexpected error during load of: com.ibm.rmi.corba.NamedValueImpl, msg=Cannot inherit from final class
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:181)
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:276)
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoaderDomain.loadClass(BaseClassLoaderDomain.java:1138)
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassFromDomain(BaseClassLoader.java:862)
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader.doLoadClass(BaseClassLoader.java:502)
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoader.java:447)
2012-03-29 09:47:11,779 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) ... 12 more
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) Caused by: java.lang.VerifyError: Cannot inherit from final class
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at java.lang.ClassLoader.defineClass1(Native Method)
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:67)
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:633)
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader$2.run(BaseClassLoader.java:592)
2012-03-29 09:47:11,780 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at java.security.AccessController.doPrivileged(Native Method)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:591)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseClassLoader.loadClassLocally(BaseClassLoader.java:568)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.BaseDelegateLoader.loadClass(BaseDelegateLoader.java:135)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.filter.FilteredDelegateLoader.loadClass(FilteredDelegateLoader.java:131)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.ClassLoadingTask$ThreadTask.run(ClassLoadingTask.java:455)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.ClassLoaderManager.nextTask(ClassLoaderManager.java:267)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) at org.jboss.classloader.spi.base.ClassLoaderManager.process(ClassLoaderManager.java:166)
2012-03-29 09:47:11,781 ERROR [STDERR] (DefaultQuartzScheduler_Worker-0) ... 18 more
Since it is throwing classNotFound, i went and checked the lib folder and the class is present in the jar named "ibmorb.jar". (Not sure why ClassNotFound is thrown)
This is the naming factory which is getting initliazed in the IntialContext
com.ibm.websphere.naming.WsnInitialContextFactory
Please help me on this
The jar and context factory mentioned would tend to indicate that the WMQ client was borrowed from a WebSphere Application Server install rather than using the stand-alone WMQ client installer. If that is the case you can likely fix this quite easily by installing the stand-alone client. You can obtain this free (with registration) as a SupportPac. These are by version so you have your choice of:
V7.1 client is SupportPacMQC71 (Preferred)
V7.0 client is SupportPacMQC7
V6.0 client is SupportPacMQC6 (Out of support as of September 2012)
Note that installing the client from the IBM-supplied installer provides a number of additional features such as diagnostics for tracing, version display, initial verification test code, sample source code, etc. This is the method of install that IBM will support so even though you can get it to work by copying the jars from the WMQ server install, using IBM's media is recommended.
Note also that the packaging of the Java and JMS classes has changed between versions. It is important to know which version that you are using and refer to the corresponding docs for CLASSPATH and other config options. The v7.1 implementation has many functional improvements and is the only version that will take advantage of the features on a v7.1 QMgr. However it will connect to any version QMgr so if this is new development, try to use the v7.1 client now so that you don't end up needing to upgrade down the road.
The Infocenter links for each version of the client are:
V7.1 Infocenter Environment Varariables for JMS & Installing classes for JMS
V7.0 Infocenter Clients and Using Java manuals
V7.0 Infocenter Clients and Using Java manuals
One of the utilities supplied with the IBM installer is the setmqjmsenv script (and setmqjmsenv64 when installing the 64-bit client) in the java/bin directory. You can look here to determine the CLASSPATH and other environment variables needed for your version of WMQ Client Classes for Java.
Solution with which I resolved this is
Deleted the IBM jars, if it is placed twice in the application
If the same jars are placed separately in two applications (running in the
same server), then, placed the jar files in jboss's lib folder (to
avoid redundant)
Placed jacorb.jar in jboss's lib folder, in order to avoid the usage
of java's default corba package
I followed these three steps and I didn't get this error !!!
Thanks for all your answers and efforts !! :-)