Weblogic 12 Caused By: javax.naming.NameNotFoundException: While trying to look up /jms/MyCF in /app/webapp/myapp.war/.; remaining name '/jms/MyCF' - spring-boot

I have issue with JNDI resolving.
Regarding this page, if it is under Weblogic it should only have this property:
https://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/#boot-features-jms-jndi
spring.jms.jndi-name=java:/jms/MyCF
JmsTemplate is created automatically. Or it should. But it didn't.
I get this exception.
Caused By: javax.naming.NameNotFoundException: While trying to look up /jms/MyCF in /app/webapp/myapp.war/923245655.; remaining name '/jms/MyCF'
at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingNode.java:1292)
at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNamingNode.java:144)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:307)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:435)
at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
Truncated. see log file for complete stacktrace

Ok, i found what was an issue.
spring.jms.jndi-name=jms/MyCF
Simple as that. :)

Related

Deploying Worklight on WebSphere

I've deployed Worklight 6 on WebSphere 8.5.5 trying to follow these instructions ( http://pic.dhe.ibm.com/infocenter/wrklight/v6r0m0/index.jsp ) with a derby database and I've encountered the following error when trying to hit my Worklight instance:
Error 500: javax.servlet.ServletException: Worklight Project not initialized
When I check the log, I can see that the worklight server has not been started due to this exception:
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'brokerSessionFactory' defined in URL [jar:file:/C:/IBM/WebSphere/AppServer/lib/worklight-jee-library-6.0.0.jar!/conf/spring-server-core.xml]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode;
...
Caused by: java.lang.AbstractMethodError: javax/persistence/spi/PersistenceUnitInfo.getValidationMode()Ljavax/persistence/ValidationMode
at org.apache.openjpa.persistence.PersistenceUnitInfoImpl.toOpenJPAProperties(PersistenceUnitInfoImpl.java:499)
at org.apache.openjpa.persistence.PersistenceProductDerivation.load(PersistenceProductDerivation.java:317)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:160)
at org.apache.openjpa.persistence.PersistenceProviderImpl.createContainerEntityManagerFactory(PersistenceProviderImpl.java:62)
I put the worklight jar directly in the WebSphere lib to solve another problem related to an Authentication class not being found if I recall correctly... Perhaps I need more jars in there, or did I solve my previous problem incorrectly? I put the javax.peristence.jar inside websphere as well, but that didn't help.
Are you using Ant scripts for deployment? This happens if you miss some steps while doing the manual application deployment.

IBM Websphere: Getting error for Spring AOP

I am getting following error while booting up the server. Application has Spring as well as AspectJ classes in it.
Caused by: java.lang.VerifyError: JVMVRFY013 class loading constraint violated; class=org/springframework/aop/aspectj/MethodInvocationProceedingJoinPoint, method=getSourceLocation()Lorg/aspectj/lang/reflect/SourceLocation;, pc=0
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:93)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:170)
at org.springframework.aop.aspectj.AbstractAspectJAdvice.currentJoinPoint(AbstractAspectJAdvice.java:83)
As a first pass I gave PARENT_FIRST option for Enterprise Application
Well, I'll write it here again as my first reply was deleted without any explanation though it was the correct one.
Given the exception you encounter you're likely at WAS 8.5.5.0. There's a known issue documented under APAR PM90932 about this. An ifix has been publisehd for this issue and you can read about it and download it from here. Once the ifix is installed, the issue won't appear again.

How and where i can use message store and message processor in ESB?

I have used two instances of WSO2 ESB 4.6 at port number 9443(esb1) and 9446(esb2) and also using Message Broker 2.0.1 at 9444. I am using this url to perform my task :http://wso2.org/library/articles/2013/03/configuring-wso2-esb-wso2-message-broker. I have done the Queue to queue send recieve example using the above link. And everything is working fine. But the problem is when i post any message to esb1, it gets reflected to esb2 since esb2 is working as my subscriber. I want that message store should store that message passed on from esb1 and based on some event it should provide esb2 the messages sent by esb1.
Thanks in advance.
When i make my Massage processor active i keep getting this error continuously :
[2013-04-08 17:58:56,658] ERROR - JobRunShell Job synapse.message.processor.quartz.Processor2-forward job threw an unhan
dled Exception:
java.lang.NullPointerException
at org.wso2.carbon.message.store.persistence.jms.util.JMSUtil.createConnection(JMSUtil.java:46)
at org.wso2.carbon.message.store.persistence.jms.JMSMessageStore.createConnection(JMSMessageStore.java:577)
at org.wso2.carbon.message.store.persistence.jms.JMSMessageStore.getReadConnection(JMSMessageStore.java:517)
at org.wso2.carbon.message.store.persistence.jms.JMSMessageStore.peek(JMSMessageStore.java:239)
at org.apache.synapse.message.processors.forward.ForwardingJob.execute(ForwardingJob.java:88)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
[2013-04-08 17:58:56,669] ERROR - ErrorLogger Job (synapse.message.processor.quartz.Processor2-forward job threw an exce
ption.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
at org.quartz.core.JobRunShell.run(JobRunShell.java:224)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: java.lang.NullPointerException
at org.wso2.carbon.message.store.persistence.jms.util.JMSUtil.createConnection(JMSUtil.java:46)
at org.wso2.carbon.message.store.persistence.jms.JMSMessageStore.createConnection(JMSMessageStore.java:577)
at org.wso2.carbon.message.store.persistence.jms.JMSMessageStore.getReadConnection(JMSMessageStore.java:517)
at org.wso2.carbon.message.store.persistence.jms.JMSMessageStore.peek(JMSMessageStore.java:239)
at org.apache.synapse.message.processors.forward.ForwardingJob.execute(ForwardingJob.java:88)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
... 1 more
Looks like there's some issue in your jndi.properties configuration. Make sure the connection factory configuration is valid which seems to have caused the reported issue. In message store implementation, the value of "connection factory" parameter defaults to "QueueConnectionFactory". If you're trying to specify another connection factory with a different name removing the default one (QueueConnectionFactory) from the configuration, make sure you specify the proper connection factory name in the appropriate element of the message store configuration.
Hope this helps!

Why doesn't Websphere like BIRT?

I am trying to start a deployment of a project to Websphere and I get the following error trail. (Shortened)
ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtView' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Cannot resolve reference to bean 'birtEngine' while setting bean property 'birtEngine'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'birtEngine': FactoryBean threw exception on object creation; nested exception is java.lang.RuntimeException: Could not start the Birt engine!
Caused by: java.lang.RuntimeException: Could not start the Birt engine!
Caused by: org.eclipse.birt.core.exception.BirtException: error.CannotStartupOSGIPlatform
Caused by: org.eclipse.birt.core.framework.FrameworkException: Cant register the ExtensionRegistry classpath
Caused by: org.eclipse.core.runtime.CoreException: Extension registry provider is already set.
The solution to the 3rd from bottom error as I have found online was to delete the following line of code.
config.setEngineHome("C:/birt-runtime-3_7_0/ReportEngine");
However, this is not present and unnecessary for our setup.
It(the BIRT specific code used) is very similar to this example online:
http://www.springsource.org/BusinessIntelligenceWithSpringAndBIRT
The BirtView and BirtEngineFactory are the only relevant parts to my project.
I have gone to this Bug Page and forum entry and tried the code addition. It did not work. The project starts up and works on Tomcat 6x without any issue.
http://www.eclipse.org/forums/index.php/m/727929/
https://bugs.eclipse.org/bugs/show_bug.cgi?id=351052
I have the class loader order in Web Sphere set to "Classes loaded with application class loader first." as in the example in the link below.
http://wiki.eclipse.org/BirtPOJO_Viewer_WebSphere_Deployment
I still get the same set of errors and I'm not sure what else I should be doing.
I know it is a bit hard to ask this without posting code, but would someone have an idea as to what I should look for?
Thanks.
I had exactly the same error as yours. I am using BIRT 3.7.2 and IBM WAS 8.5
With reference to the bug detailed below,
org.eclipse.core.runtime.CoreException when restarting the ReportEngine
and the actual reason of the bug, specified below,
ServiceLauncher.shutdown() doesn't release default RegistryProvider
I added the following line before the Platform.startup(..) call
RegistryProviderFactory.releaseDefault();
After this, BIRT reports are working fine.
But, I'm doubtful, as to whether this will break anything in WAS's runtime or not.
The reason for this is ...
As explained in the bug, this exception occurs when Platform start-up is attempted for a second time. Here, on Platform.shutdown(), the RegistryProvider is not released, and hence the exception.
Now, in my case, IBM Websphere 8.5 internally uses OSGi and hence starts OSGi Platform.
Hence, when our application attempts to start the Platform again (the second start), the exception occurs.
My concern here is, this should not break anything with WAS’s runtime (as it uses OSGi internally).
The Registry Provider is not null, as its set by BIRT runtime, so, the only problem here can be of Class Version mismatch i.e., WAS’s Registry Provider and BIRTs Registry Provider, if different, then version clashes.
I'm not sure of the solution i have used.
Experts, please guide.

What's mean that Caused by: javax.validation.ValidationException: Unable to find a default provider?

I compiling springframework project using with springframework-3.0.1. But, I got error messages, "Caused by: javax.validation.ValidationException: Unable to find a default provider",
What is it? help me,
Do you actually have a ValidationProvider on your class path?
Try adding the reference implementation Hibernate Validator 4 to your class path.

Resources