I'm migrating one application from Websphere to jboss EAP 6.0. I've made the Datasources on Jboss console. But in my code I've referring this way:
but while hitting the application from Jboss, it's giving the below error:
FATAL http-/135.155.175.224:8080-1 dbconn.DBAccess - getDatasource():
CRITICAL ERROR: JDBC Naming service exception: JBAS011843: Failed
instantiate InitialContextFactory
com.ibm.websphere.naming.WsnInitialContextFactory from classloader
ModuleClassLoader for Module "deployment.UPMSSSO.ear.UPMSSSO.war:main"
from Service Module Loader
Could anyone please hint the error. Is there any other in for JBoss?
Since you are migrating to Jboss from WebSphere and you are using "com.ibm.websphere.naming.WasInitialContextFactory" class, which is WAS specific class, that's why you are getting this error.
Change that to "org.jboss.naming.remote.client.InitialContextFactory" and then try again. That should resolve your issue.
UPDATE
All you should have to do is new InitialContext(), without any argument. JNDI is pre-configured with the appropriate properties for you by the app server unless you are looking for remote objects on any other server.
Related
Scenario:
I try to deploy web services to weblogic server by Jenkins + weblogic deployer.
I successfully get war files after build.
While deploying war files I get below error in console.
Additional descriptions:
This is enterprise environment. Jenkins and Weblogic server are running on different servers but connetions are ok. On weblogic server there 4 applications
my web services running on a cluster.
Question: What is the meaning of this error? How to fix it or at least where should I concentrate? :)
Reason: javax.naming.NameNotFoundException: While trying to lookup
'weblogic.management.home.localhome' didn't find subcontext 'home'.
Resolved 'weblogic.management' [Root exception is
javax.naming.NameNotFoundException: While trying to lookup
'weblogic.management.home.localhome' didn't find subcontext 'home'.
Resolved 'weblogic.management']; remaining name 'home/localhome'
You're getting a NameNotFoundException when trying to lookup a resource (weblogic.management.home.localhome) using JNDI. The exception says that part of the name is resolved (weblogic.management) but that it cannot resolve the remainder (home.localhome).
In the Javadoc for NameNotFoundException, you'll see:
This exception is thrown when a component of the name cannot be resolved because it is not bound.
That means that, either the subcontext information for the JNDI resourcs (home.localhome) is incorrect, or the subcontext (home.localhome) is not registered with the JNDI naming service.
See http://docs.oracle.com/javase/7/docs/api/javax/naming/NamingException.html (superclass of the NameNotFoundException) for the exception and review the JNDI info here for configuration help: http://docs.oracle.com/middleware/1221/wls/WLACH/core/index.html
My java EE application is giving following error when i try to run the application on glassfish server. It says "Invalid resource : jdbc/busservice__nontx". Where should i look to fix this error? Previously it was giving error with "jdbc/busservice__pm". Once I created JDBC resource and connected with connection pool, error disappeared. However i'm still getting error with "jdbc/busservice__nontx"
Info: PER02100: Could not load Toplink Essentials. Assuming this is an upgrade from V2. Switching Persistence Unit [BusReservationPU] to use [org.eclipse.persistence.jpa.PersistenceProvider] as JPA provider. If you intend to use Toplink Essentials, please ensure that it is visible to your application."
Severe: Exception while invoking class org.glassfish.persistence.jpa.JPADeployer prepare method
Severe: java.lang.RuntimeException: Invalid resource : jdbc/busservice__nontx
at com.sun.enterprise.connectors.ConnectorRuntime.lookupDataSourceInDAS(ConnectorRuntime.java:593)
at com.sun.enterprise.connectors.ConnectorRuntime.lookupNonTxResource(ConnectorRuntime.java:559)
at org.glassfish.persistence.common.PersistenceHelper.lookupNonTxResource(PersistenceHelper.java:59)
at org.glassfish.persistence.jpa.ProviderContainerContractInfoBase.lookupNonTxDataSource(ProviderContainerContractInfoBase.java:76)
at org.glassfish.persistence.jpa.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:109)
at org.glassfish.persistence.jpa.PersistenceUnitLoader.loadPU(PersistenceUnitLoader.java:142)
Do not add "jdbc/busservice__pm" to your Glassfish JDBC Resources, just add it as "jdbc/busservice". It looks like the __pm and __nontx are some internal names that it adds to the end of your jdbc name internally, and when you specifically add it will mess it up and throw that error.
I have upgraded my web application from java6 to java7. I have deployed web tier, ejb tier and web service tier on weblogic 10.3 successfully. Everything works fine except stateful ejb. During these ejb invocation , I get following exception on server logs.
java.rmi.UnmarshalException: cannot unmarshaling return; nested exception is:
java.rmi.UnexpectedException: Failed to parse descriptor file; nested exception is:
java.rmi.server.ExportException: Failed to export class SearchAccountSessionBean_qa86w0_EOImpl problem with rmi descriptor signature getFilterCount([Lcom.abc.SearchResultFilterName;)RemoteMethodSet=[setPrimaryKey(Ljava.lang.Object;), ......
Can anyone advice what may be the root cause. my ejb version is 2.0.
Sometimes the EJBCompilerCache in weblogic will have the old bean details resulting in the above said error.
Just clean the weblogic application server tmp and cache folders and try again.
I made a Java web project using Tomcat server.Now I am opening the same project in another PC where only Glassfish is installed(Due to some reasons I don't wanna run the project using Tomcat anymore).But it gives this exception now.
Exception during lifecycle processing
Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Unable to add listener of type: com.chat.listeners.ChatAppListener, because it does not implement any of the required ServletContextListener, ServletContextAttributeListener, ServletRequestListener, ServletRequestAttributeListener, HttpSessionListener, or HttpSessionAttributeListener interfaces
Is there any warning when you opening the project in netbeans.Right click on the project , select resolve server missing problem.Choose Glassfish server.Run once again.
You have apache specific relations in your web.xml file (like file handler servlets).
That is why glassfish can't start your application.
After plenty of attempts and research I can't figure out where this exception comes from:
SEVERE: Exception in thread "Thread-31"
SEVERE: java.lang.IllegalStateException: WEB9031: WebappClassLoader unable to load resource [vboxwebService_4_0.wsdl], because it has not yet been started, or was already stopped
at org.glassfish.web.loader.WebappClassLoader.findResourceInternal(WebappClassLoader.java:2074)
at org.glassfish.web.loader.WebappClassLoader.findResource(WebappClassLoader.java:1034)
at org.glassfish.web.loader.WebappClassLoader.getResource(WebappClassLoader.java:1169)
at org.glassfish.web.loader.WebappClassLoader.getResource(WebappClassLoader.java:1135)
at org.virtualbox_4_0.PortPool.getPort(VirtualBoxManager.java:105)
at org.virtualbox_4_0.PortPool.preinit(VirtualBoxManager.java:82)
at org.virtualbox_4_0.PortPool.access$200(VirtualBoxManager.java:36)
at org.virtualbox_4_0.PortPool$1.run(VirtualBoxManager.java:62)
at java.lang.Thread.run(Thread.java:662)
The idea was to create a webservice that uses the virtualbox 4.0 sdk.
I tried this within:
- eclipse helios service pack2
- glassfish 3.1
The service contains the vboxjws.jar in WEB-INF/lib now whenever I try to start it upon the server I get the exception from above.
Am I missing something essential that could solve this issue?
Thanks in advance,
Giriel