JMS, MQ Exception in WebSphere - java

I am getting this exception when I am trying to read message from WebSphere MQ via MDB, can any one please guide me.When I deploy the EAR file on my WebSphere then it works flawlessly but I am getting exception on a different WebSphere. Am I missing something in configuration, why does this exception occur?
javax.ejb.EJBException: Injection failure; nested exception is: java.lang.IllegalArgumentException: Can not set javax.jms.ConnectionFactory field com.ultramatics.hawkeye.mdb.listener.HawkeyeMdbListener.replyCF to com.ibm.mq.jms.MQQueue

You are obviously trying to assign a ConnectionFactory field with a MQQueue object, two different types.
I guess you grab them from JNDI or similar and that there might be some naming mess up in the configuration?

Related

Getting exception on IBM Websphere MQ JMS connection with spring boot

While trying to connect IBM MQ JMS queue from spring boot application , I am getting below exception
Caused by: com.ibm.msg.client.jms.DetailedJMSException: JMSCC0005: The specified value '' is not allowed for 'XMSC_WMQ_APPNAME'.
I have been already been referring to :
https://github.com/ibm-messaging/mq-jms-spring, but doesnt help.
Any suggestions
The string XMSC_WMQ_APPNAME is the value of constant WMQ_APPLICATIONNAME. The application name can be set with JMS methods MQConnectionFactory.setAppName(), see APPLICATIONNAME.
For some reason the the application name does not get set. Please share your MQ connection configuration for your Spring Boot application.

Getting Exception while deploying war file in Glassfish 4 or 5

I'm getting exception while deploying war file in Glassfish server 4 and 5. However I didn't have any issues in Glassfish 3.
The exception is "The lifecycle method [finalizeConfig] must not throw a checked exception. Related annotation information: annotation [#javax.annotatikn.Postconstruct()] on anoted element [public void org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.finalizeConfig() throws java.security.generalSecurityException, Java.io.IOException] of type [METHOD].
It seems like conflict between jetty http server and cfx transport.
I googled and found some solutions but nothing works.
Tried by removing transport Jettyhttp in cfx bundle.
Tried by upgrading cfx version.
So looking for some perfect solution.
According to the #PostConstruct annotation, it shouldn't be used with methods that throw checked exceptions. GF 4 and 5 validate this and won't allow deployment. Since the error is raised for a Jetty class which you can't fix,you should remove Jetty and all classes that validate this rule from your application completely. There's no way how to configure GF to ignore this.
See also https://stackoverflow.com/a/35428512/784594 for more details.

RMI, Wildfly 10x, Spring: NoClassDefFoundError: org.omg.CORBA.COMM_FAILURE

I have a Spring-Boot application, which exposes some of its Interfaces to other projects. The basic process of this has been tried and tested within the project structure very often, so this SHOULD not be a "simple" RMI issue like missing serialization or incorrect registry.
This project (coded on java7) and an older project (also java7) are to be deployed in a wildfly 10.x container.
Basically, it is planned that our old application talks to the Spring-Boot application to get specific data sets. When starting the application, the beans are instantiated correctly, and the basic connection seems to be okay. However, when using an entirely valid call, I get this:
ERROR [io.undertow.request] (default task-5) UT005023: Exception handling request to /servlet/Foo: org.springframework.web.util.NestedServletException: Handler processing failed; nested exception is java.lang.NoClassDefFoundError: org/omg/CORBA/COMM_FAILURE
I tried debugging the application, and when using the offending method call, the remote class is being triggered and does its work normally, the return value is as expected and is being returned to the spring context.
The weird thing is this part of the Stack Trace:
java.lang.NoClassDefFoundError: org/omg/CORBA/COMM_FAILURE
at org.springframework.remoting.rmi.RmiClientInterceptorUtils.isCorbaConnectFailure(RmiClientInterceptorUtils.java:229)
at org.springframework.remoting.rmi.RmiClientInterceptorUtils.isConnectFailure(RmiClientInterceptorUtils.java:213)
at org.springframework.remoting.rmi.RmiClientInterceptor.isConnectFailure(RmiClientInterceptor.java:282)
at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:347)
at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:259)
because when I try to access RmiClientInterceptorUtils.java:229, Eclipse tells me that 229 is not a valid line number. This would lead me to believe that there is a versioning difference in Spring webMVC between server and client. This persisted, even after changing the version number (now using 3.2.8.RELEASE of spring-webmvc), the errors persisted.
I checked if there might be a dependency problem, but CONN_FAILURE is part of rt.jar and should, as far as I know, be present in every java project. Further testing revealed that:
Checked Exceptions are transferred normally
primitive values (like boolean) are transferred correctly
complex Objects cause the exception to be thrown
I'd appreciate any help with this matter, as I am at a loss to explain or correct this.
Thanks.
NOTE:
The general reason for the raised exception has been found - a class was missing the Serializable interface. This does, however, not answer the question why the COMM_FAILURE raised a NoClassDefFoundError, which is something I still would like to know.

Can I have two embedded ActiveMQ queues in JBoss?

I have set up ActiveMQ as an embedded broker (from this tutorial), and now I want to add a new application, in a different EAR, which needs a new queue.
Has anyone been able to do this?
If I try making two resource adapters in my standalone.xml, they end up using the same broker-config, and I get the error below. So that doesn't seem right.
Error creating bean with name 'org.apache.activemq.xbean.XBeanBrokerService#0' defined in class path resource [broker-config.xml]: Invocation of init method failed; nested exception is javax.management.InstanceAlreadyExistsException: org.apache.activemq:type=Broker,brokerName=brokerOne

"ejb not bound" -- What could be the problem?

When I'm running my program, I get the following error:
... nested exception is
javax.naming.NameNotFoundException:
ejb not bound
The error occurs at the start up when Java wants to create a certain bean.
The Bean is a SimpleRemoteStatelessSessionProxyFactoryBean. Could it be that I ain't got the rights to access the naming provider URL although I can ping it?
When accessing the bean on my local JBoss there are no problems.
Ok, the bean wasn't running on the remote service. No wonder it didn't work.
It found out through the jmx-console's JNDIView -> list() function.

Categories

Resources