I tried to put Apache JNDI for Hornetq according to these blog : http://wash-inside-out.blogspot.com/2010/08/hornetq-jms-integration-with-tomcat.html. but I'm getting this error now :
Deployment "Naming" is in error due to: javax.naming.NoInitialContextException: Cannot instantiate class: org.apache.naming.java.javaURLContextFactory [Root exception is java.lang.ClassNotFoundException: org.apache.naming.java.javaURLContextFactory ]
How to find out which jar file has that class?
According to this search result in FindJar, naming-factory-5.5.23.jar is the one that contains that class. Beware that the dependency scope is test in the example you provided. Are you doing the lookup in non test code?
Related
My application currently working under weblogic 10.3 with Java 1.6.
Now we are trying to deploy same application to weblogic 12cR2 & java 1.8, below is the error we are facing.
Unable to bind Business Interface to the JNDI name: Gen4CServlet_warcontact_Home, throw exception javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind the interface com.hh.cc.ce.RemoteContactSession to RemoteContactession. Another EJB has already bound an interface to that name.; remaining name 'ejb/Contact#com/ce'. NestedException Message is :[EJB:011224]Unable to bind the interface com.hh.cc.ce.RemoteContactSession to RemoteContactSession. Another EJB has already bound an interface to that name."
weblogic.application.ModuleException: Unable to bind Business Interface to the JNDI name: iLinqGen4CGEServlet_warcontactge_Home, throw exception javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind the interface com.hh.cc.ce.RemoteContactGESession to RemoteContactGESession. Another EJB has already bound an interface to that name.; remaining name 'ejb/Contact#com/hh/cc/ce'. NestedException Message is :[EJB:011224]Unable to bind the interface com.hh.cc.ce.RemoteContactSession to RemoteContactSession. Another EJB has already bound an interface to that name.
at weblogic.application.internal.ExtensibleModuleWrapper.activate(ExtensibleModuleWrapper.java:123)
at weblogic.application.internal.flow.ModuleListenerInvoker.activate(ModuleListenerInvoker.java:114)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:212)
at weblogic.application.internal.flow.ModuleStateDriver$2.next(ModuleStateDriver.java:207)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:45)
Truncated. see log file for complete stacktrace
According to Oracle KM Unable To Bind Business Interface To The JNDI Name javax.naming.NameAlreadyBoundException: [EJB:011224]Unable to bind (Doc ID 2254400.1), this can be due to Class-Path entry in MANIFESF.MF file. Try to remove the same redeploy the application.
I'm trying to publish to a MQTT topic thanks to the appropriate Apache Camel MQTT component.
So in my spring context XML I have the following:
<camel:to uri="mqtt:test?host=ssl://myhost:8883&publishTopicName=test&userName=test&password=test"/>
But I'm getting the following error at startup :
Failed to create Producer for endpoint:
Endpoint[mqtt:test?host=ssl://myhost:8883&publishTopicName=test&userName=test&password=test]. Reason: java.lang.NullPointerException
Everything is working fine when not using ssl, the following configuration (regular tcp instead of ssl) is working well :
<camel:to uri="mqtt:test?host=tcp://myhost:1883&publishTopicName=test&userName=test&password=test"/>
I've added the javax.net.ssl.trustStore JVM property pointing to my certificates store but without any effect.
Does someone already met this issue ? Is there something to specifically add in the spring DSL configuration file when using the camel mqtt component with ssl ?
EDIT :
The stacktrace of the NPE :
Caused by: java.lang.NullPointerException at
org.fusesource.hawtdispatch.transport.SslTransport.connecting(SslTransport.java:194)
at
org.fusesource.mqtt.client.CallbackConnection.createTransport(CallbackConnection.java:285)
at
org.fusesource.mqtt.client.CallbackConnection.connect(CallbackConnection.java:138)
at
org.apache.camel.component.mqtt.MQTTEndpoint.connect(MQTTEndpoint.java:305)
at
org.apache.camel.component.mqtt.MQTTProducer.doStart(MQTTProducer.java:38)
at
org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
at
org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:3219)
at
org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1209)
at
org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:1170)
at
org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:442)
... 33 more
Debugging through javax.net.debug=ssl was useful.
Actually there were an issue on the java.security where the security.provider property was not set properly. That was manually changed for testing purpose related to another application.
Since, everything is working fine. Sorry for the post related to a internal specific mistake.
Alex.
When trying to authenticate an adapter using custom authenticator and login module, I am facing the following exception.
[ERROR ] FWLST0003E: ========= Failed starting project /CustomAuth [project CustomAuth]
Error creating bean with name 'taskManager' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'worklightAuthenticationService' while setting bean property 'authenticationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklightAuthenticationService' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot create inner bean 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' of type [com.worklight.core.auth.impl.LoginConfigurationServiceBean] while setting bean property 'loginConfigurationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
[AUDIT ] CWWKZ0001I: Application CustomAuth started in 0.948 seconds.
[ERROR ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:300)
at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:111)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
at [internal classes]
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
... 5 more
Could you help me?
Seems that your project war does not contain your java classes for some reason. I am not sure why, need more information on that, but I think that by deleting your bin folder and rebuilding all artifact you will be able to solve this issue.
Look your JDK version between your generated binary app and your Worklight server version. You can check if the binary is generated in Windows or Unix based operative system and redeploy your app taking the server operative system as a base for your binary app.
Need to write their own java class for custom authentication. These java class will act like authenticator and challenger while writing a custom authentication method.
Please find the documentation for the HTTP based custom authentication.
I am using bean validation in my application. When there is no constraint validation errors everything works nicely. Every time there is a validation error, Glassfish throws the following exception:
Caused by: java.lang.ClassNotFoundException: javax.validation.groups.Default: java.net.MalformedURLException: Unknown protocol: osgi
at com.sun.corba.ee.impl.util.JDKBridge.loadClassM(JDKBridge.java:325)
at com.sun.corba.ee.impl.util.JDKBridge.loadClass(JDKBridge.java:228)
at com.sun.corba.ee.impl.javax.rmi.CORBA.Util.loadClass(Util.java:640)
at com.sun.corba.ee.impl.util.RepositoryId.getClassFromType(RepositoryId.java:628)
at com.sun.corba.ee.impl.orbutil.RepIdDelegator.getClassFromType(RepIdDelegator.java:169)
at com.sun.corba.ee.impl.encoding.CDRInputStream_1_0.readClass(CDRInputStream_1_0.java:1439)
The bean-validation.jar is present in glassfish/modules folder. The startup doesn't throw any exceptions regarding validation.
PS. Note that we are using remote beans with CORBA.
Reproducable on GlassFish 3.1.2.2 and 3.1.1.
I traced this problem to serialization of the ConstraintValidationException through CORBA. Somehow the bean-validation module is not loaded properly with osgi and the javax.validation.groups.Default class is missing. I made a quick workaround so that the ConstraintValidationException is intercepted and never sent through CORBA. Instead the validation error information is gathered in a custom Exception class that can be actually serialized through the services.
facing some strange behavior in OSB, i have configured WLS with MQ in client mode, i am doing some minor test to check the connection, i have created a proxy service to read the message from Q1 and a Business Service(BS) to route it to Q2. The issue is the proxy is able to read the message but the BS is throwing this:
JMSPool BEA-169807 There was an error while making the initial connection to the JMS resource named ALSB_JMS_SessionPool_491704821 from within an EJB or a servlet. The server will attempt the connection again later. The error was javax.jms.JMSException: [JMSPool:169803]JNDI lookup of the JMS connection factory AKBConnFact failed: javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.jndi.fscontext.RefFSContextFactory
Note: The classpath or the domain/lib folder contains the RefFSContextFactory class
Any ideas gang..? TIA
The answer is this is a bug in OSB which needs to be reported.
As a workaround you need to individually set the jars in the weblogic classpath in your domain/server/bin folder. just go through the link below for more details:
http://forums.oracle.com/forums/thread.jspa?threadID=2135523&start=0&tstart=0