WAS8.5.5 not incorporating Jacorb application - java

I had an application which is tightly coupled with jacorb and it is working great with Jboss. Now, i have to migrate this application to deploy the same in Websphere 8.5.5. General flow is , my application will reach another system (developed in C++) through corba usign jacorb. since IBM is having its own ORB implementations, My application is getting deployed in websphere. If my application is modified to make use of IBM orb jars, then 80% of applciation have to change. Kindly suggest me the way to include jacord proeprties and jar to resolve the errors.
My trails : All trails are independent to each other.
1) Kept my orb.properties, jacorb.jar and removed IBM orb.properties in WAS->JAVA->JRE->lib
2) Included my files in JVM classpath through Admin console.(Server failed to start after this change).
3) Modified the IBM orb.properties with jacorb properties but getting classcast exceptions.
Errors:
[3/4/15 0:52:23:175 PST] 00000001 ContainerHelp E WSVR0501E: Error creating component null [class com.ibm.ws.runtime.component.ORBImpl]java.lang.NullPointerException
at java.util.Hashtable.put(Hashtable.java:877)
at org.jacorb.config.JacORBConfiguration.setAttribute(Unknown Source)
at org.jacorb.config.JacORBConfiguration.setAttributes(Unknown Source)
at org.jacorb.config.JacORBConfiguration.init(Unknown Source)
at org.jacorb.config.JacORBConfiguration.<init>(Unknown Source)
at org.jacorb.config.JacORBConfiguration.getConfiguration(Unknown Source)
at org.jacorb.orb.ORB.set_parameters(Unknown Source)
at org.omg.CORBA.ORB.init(ORB.java:371)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
[3/4/15 0:52:23:347 PST] 00000001 ContainerHelp E WSVR0501E: Error creating component com.ibm.ws.naming.bootstrap.NameServerImpl#e69374e2[_serverProcessType=UnManagedProcess, _listener=null,
Caused by: javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.reflect.InvocationTargetException]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:400)
at com.ibm.ws.naming.urlbase.UrlContextImpl.<init>(UrlContextImpl.java:177)
at com.ibm.ws.naming.urlns.genericURLContext.<init>(genericURLContext.java:83)
at com.ibm.ws.naming.urlns.genericURLContextRoot.<init>(genericURLContextRoot.java:79)
at com.ibm.ws.naming.urlns.genericURLContextFactory.createURLContextRoot(genericURLContextFactory.java:110)
... 51 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:391)
... 55 more
Caused by: java.lang.ClassCastException: org.jacorb.orb.ORB incompatible with com.ibm.CORBA.iiop.ORB
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at
Thanks for your support in advance.

Related

com.bea.wli.monitoring.MonitoringException: Caused by: java.lang.IllegalArgumentException: Server 'null' not found

I have java code that uses Java Management Extensions (JMX) monitoring API to get service statistics data from oracle weblogic console.
I have a production server and a testing server.
this java code works fine and gets service statistics data from weblogic console of testing server. when i run this code for production server it shows the below error :
java.lang.reflect.UndeclaredThrowableException
at $Proxy0.getProxyServiceStatistics(Unknown Source)
at reports.All_ServiceStatisticsReport.getProxyServiceDetails(All_ServiceStatisticsReport.java:235)
at reports.All_ServiceStatisticsReport.<init>(All_ServiceStatisticsReport.java:189)
at reports.All_ServiceStatisticsReport.main(All_ServiceStatisticsReport.java:567)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at reports.All_ServiceStatisticsReport$ServiceDomainMBeanInvocationHandler.invoke(All_ServiceStatisticsReport.java:145)
... 4 more
Caused by: com.bea.wli.monitoring.MonitoringException: [OSB-473057]Failed to get statistics for services due to java.lang.IllegalArgumentException: Server 'null' not found
at weblogic.utils.StackTraceDisabled.unknownMethod()
Caused by: java.lang.IllegalArgumentException: Server 'null' not found
... 1 more
Process exited with exit code 0.
the line where the error occurs is :
proxyServiceResourceStatisticMap = serviceDomainMbean.getProxyServiceStatistics(filteredProxyServiceRefs,resourceType.value(),null);
I am passing all the right arguments according to the oracle docs.
https://docs.oracle.com/middleware/1213/osb/java-api/com/bea/wli/monitoring/ServiceDomainMBean.html
then why i am getting this error.
thanks in advance.

Using jax-ws in MobileFirst server (Liberty server)

We are trying to access SOAP 1.1 Web services from a Java JAX-RS adapter.
We are using a SOAP Client that has been generated from our WSDL.
But when unmarshalling soap fault we get the following exception:
...
Caused by: java.lang.ExceptionInInitializerError
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:107)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:78)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:135)
at com.sun.proxy.$Proxy196.rechercherContrats(Unknown Source)
at fr.sma.prod.adapter.ContratResource.rechercherContrats(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRequest(InvokeMethodHandler.java:63)
...
Caused by: java.lang.ClassCastException: com.sun.xml.bind.v2.runtime.JAXBContextImpl cannot be cast to com.sun.xml.internal.bind.api.JAXBRIContext
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder$1.run(SOAPFaultBuilder.java:570)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder$1.run(SOAPFaultBuilder.java:566)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createJAXBContext(SOAPFaultBuilder.java:565)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.<clinit>(SOAPFaultBuilder.java:555)
... 94 more
Versions:
********************************************************************************
product = WebSphere Application Server 8.5.5.5 (wlp-1.0.8.cl50520150305-2202)
wlp.install.dir = C:/Users/a10344/.ibm/mobilefirst/7.1.0.00.20150807-0630/server/wlp/
java.home = C:\Program Files\Java\jdk1.7.0_71\jre
java.version = 1.7.0_71
java.runtime = Java(TM) SE Runtime Environment (1.7.0_71-b14)
os = Windows 7 (6.1; amd64) (en_US)
process = 52164#P72302W
********************************************************************************
The jaxb classes for the service are generated with a CXF maven plugin that generates a standard jax-ws/jaxb code.
...
service= javax.xml.ws.Service.create(wsdlUrl,serviceQName);
productionService= service.getPort(ProductionService.class);
productionService.rechercherContrat(...);
...
Thanks,
Milan
Seems like we're unable to use java adapters with soap (Unsolvable Class conflicts with JaxB between JDK and Embedeeded Worklight Jar). Seems like it's an unsolved bug : Now IBM ask us to open an issue send our code to solve the problem.
Well, to sum-up : There no solution. We're waiting next version hoping this problem solved.

java.lang.UnsatisfiedLinkError: cqjnilinuxproxy (Not found in java.library.path)

I have webservices deployed on WAS that use Clearquest jars to connect to Clearquest. At runtime, I get the following errors.
java.lang.Exception: Cannot parse the output since it has an error. Error = ReasonCode = conflictCRVAP0049E (internal-error): Cannot instantiate protocol provider: cqjnilinuxproxy (Not found in java.library.path)
...java.lang.reflect.InvocationTargetException:
at com.ibm.rational.stp.cs.internal.util.StpExceptionImpl.realException(StpExceptionImpl.java:493)
at com.ibm.rational.stp.cs.internal.util.StpExceptionImpl.<init>(StpExceptionImpl.java:572)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:56)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:39)
at java.lang.reflect.Constructor.newInstance(Constructor.java:527)
at com.ibm.rational.stp.client.internal.core.ProtocolSubprovider.setProtocolProvider(ProtocolSubprovider.java:614)
... 57 more
Caused by: java.lang.UnsatisfiedLinkError: cqjnilinuxproxy (Not found in java.library.path)
at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1090)
at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:1054)
at java.lang.System.loadLibrary(System.java:510)
at com.rational.clearquest.cqjni.CQJNIBaseObj.<clinit>(Unknown Source)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:202)
at com.ibm.rational.stp.client.internal.cqjni.CqJniProtocol.<init>(CqJniProtocol.java:2343)
... 62 more
I followed the technote https://www-304.ibm.com/support/docview.wss?uid=swg21515079 - "An exception occurs on 64-bit WebSphere servers when running reports from ClearQuest data sources that require the Java Native Interface (JNI).
As suggested, WAS 32-bit was installed instead on 64 bit. But the error still occurs. Can you please let me know where this library is or what is going wrong?
Thanks,
Aarthi
The ClearQuest libraries and jars need to be placed on the path so WebSphere can pick them up. Did you source cq_setup.csh prior to starting the WebSphere profile? You would need to source cq_setup.csh and then start the profile in the same shell.

java rmi call failure across different jvm versions

I have existing rmi server running with jvm 1.5 and client running in jvm 1.6 communicating with no issues.
However, when i run (server under JVM 1.7/ client jvm1.7) OR (server under JVM 1.7/ client jvm 1.6)getting following error -
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
java.rmi.UnmarshalException: Error unmarshaling return header; nested exception is:
java.io.EOFException
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at com.tmobile.kiosk.simulator.Kiosk.<init>(Unknown Source)
at com.tmobile.kiosk.simulator.Kiosk.main(Unknown Source)
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(Unknown Source)
With (Server jvm 1.5/ client jvm 1.7) getting following error -
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: com.xxx.yyy.zzzserver.ZZZServerFactoryImpl_Stub (no security manager: RMI class loader disabled)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
Is this happening due to RMI changes across Java versions?
Can i run rmi Server in JVM 1.7 without any code changes so that existing clients (jvm 1.5 etc) can connect to it.
We are not rebuilding the jar file which was built probably using java 1.4 or 1.5.
Thanks in Advance
Problem was some old jar versions being part of classpath.

Using Jersey Client inside EJB 3 stateless session bean on Weblogic

I am using Jersey client inside a EJB 3 stateless session bean. I can deploy the EJB project on Weblogic 11g. But when I try to look up the bean from a JSP, I get the following error
javax.ejb.EJBException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/sun/jersey/api/client/Client; nested exception is: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/sun/jersey/api/client/Client
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:112)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:91)
at $Proxy66.sayHelloFromServiceBean(Unknown Source)
at jsp_servlet.__yelpin._jspService(__yelpin.java:92)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3594)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2202)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2108)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1432)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NoClassDefFoundError: com/sun/jersey/api/client/Client
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:205)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:345)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at com.yelpin.ABCD_xruy6c_ABCDRemoteImpl_1032_WLStub.sayHelloFromServiceBean(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:73)
... 15 more
Caused by: java.lang.NoClassDefFoundError: com/sun/jersey/api/client/Client
at com.yelpin.ABCD.sayHelloFromServiceBean(ABCD.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:55)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy67.sayHelloFromServiceBean(Unknown Source)
at com.yelpin.ABCD_xruy6c_ABCDRemoteImpl.sayHelloFromServiceBean(ABCD_xruy6c_ABCDRemoteImpl.java:61)
at com.yelpin.ABCD_xruy6c_ABCDRemoteImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
... 23 more
I am new to EJB 3, Jersey and Weblogic. What I understand is that, the stateless session bean is unable to find the Jersey Client class. Can anyone help me with this ?
I have two projects in OEPE (Oracle Enterprise Pack for Eclipse). One is a EJB 3.0 project which contains the stateless session bean. The other is a dynamic web project which contains the JSP from which I do a JNDI look up to get the stateless session bean. I am using Jersey Client class inside one of the methods in the stateless session bean. This method is invoked from the JSP.
When I check the deployments on the server using Administrator console, there are two deployments. One is an EAR auto generated by OEPE. This EAR corresponds to the dynamic web project. The other deployment is of type EJB.
I also tried adding the jersey jar files to the lib folder under the server and restarted the server. But still, I get the same error.
Indeed, the NoClassDefFoundError means that the definition of the Jersey Client class can't be found and loaded at runtime (it was there at compile time though). So this is very likely a classpath or packaging issue.
Put your Jersey jar in the APP-INF/lib directory of the EAR and try again (if it doesn't work, please update your question with the structure of your EAR).
See http://download.oracle.com/docs/cd/E12839_01/web.1111/e13706/libraries.htm#sthref135 and http://download.oracle.com/docs/cd/E12839_01/web.1111/e13706/classloading.htm for more details.
Update: JARs should go in EarContent/APP-INF/lib that should have been automatically created but I'm not using OEPE so I can't confirm. Note that according to this very recent thread, there might be a bug in the OEPE publisher that is under investigation (at least under Linux).

Categories