Lookup.context
hello.
I programed a web application with jdeveloper (J2EE : servlet, html pages, EJB). It run in jdeveloper, on the oc4j embedded server. But it not work on Internet explorer : lookup.context("nameOfEJBInterface") return null.
How can I do to make the application work ?
thank you.
Dj.
Hello Duncan
Do you mean once you deploy it it does not work, or when you run it in the internal JDeveloper container but use IE to access the page it does not work? It sounds like you've not deployed the application correctly to the target application server.
the application works when I deploy it in the internal jdeveloper container. In IE, the first page appears, and I can enter datas (user name and password). When I clic on the submit button, the application is stopped.
I print the value of lookup.context to say what it return, and it is "null" value. in jdeveloper, it gives me the value of the session bean I used to have datas from one database.
thank you to response !!!
regards
Dj.
Similar Messages
-
Context lookup problem in iplanet application server 6.0 sp3?
Hi all,
I am writing codes in the following enviornment, iplanet application server 6.0 sp3 with iplanet web server 4.1 sp7 in Window 2000.
When I tried to login to the system, error occured when i try to lookup context for my session bean.
The error message is as follows:
login_process.jsp: Home / Remote Error:String index out of range: -7
[10/Apr/2002 18:09:10:5] error: Exception: SERVLET-execution_failed: Error in ex
ecuting servlet JSPRunnerSticky: java.util.EmptyStackException
Exception Stack Trace:
java.util.EmptyStackException
at java.util.Stack.peek(Stack.java:86)
at java.util.Stack.pop(Stack.java:68)
at com.netscape.server.deployment.AppComponentDescriptorUtil.popCurrentAppComponent(Unknown Source)
at com.netscape.server.servlet.servletrunner.AppInfo.popWebAppDescriptor(Unknown Source)
at com.netscape.server.servlet.servletrunner.ServletInfo.service(Unknown Source)
at com.netscape.server.servlet.servletrunner.ServletRunner.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.applogic.AppLogic.execute(Unknown Source)
at com.kivasoft.thread.ThreadBasic.run(Native Method)
at java.lang.Thread.run(Thread.java:479)
could anyone suggest a method to solve the problem?
Thx very much!There is a major security breach in authenticating
iPlanet Web Server 6.0 SP3 and SP4 using Sun ONE
Directory Server. Using a valid user id, any
password except null string would allow user access
the restricted resources. iPlanet Web Server 6.0 SP5
and 4.1 SP12 worked fine with similar configuration.Did you get an answer for this?
We are having the exact same problems with our iPlanet Web server 6.0 SP3.
thank you. -
BRF+: No context assigned to DB Lookup
Hello expert,
I am trying to create a BRF+ routing rule but I am facing since hour a problem.
I am refering to http://scn.sap.com/thread/3324445
When trying to create rules I got the message:
No context assigned to DB Lookup 'Z_GET_ROLEID' yet. Query result includes all data objects !
When I click on ROLE_NAME is got following picture and got a warning.
From SDN blog is see that I should look like this:
So what did I wrong, where is the missing link?
Thanks for any support which help me to complete my rule creation.
Regards NguyenHi, problem solved.
create lookup. context overview is empty.
Now add lookup into decision table so the link to context view is done.
Now the context overview is available. Click on close.
Select your element and it works!
Enjoy BRF+ DB_LOOKUP
Best Nguyen -
JNDI Lookup hangs with AppServer 8
Hi,
I created a simple SessionBean on Sun One AppServer 8.
I wrote a standalone application that you can find below. What is does is in a loop, create an initial context and lookup the EJB.
The problem is that after a few iterations, it hangs.
I realized that the number of iterations is equal to half the size of the thread pool.
What am I doing wrong here? I used the same example on AppServer 7 and it works fine.
Thanks for your help
Jean-Noel Colin
package be.oxys.test;
import javax.naming.*;
import javax.ejb.*;
import java.util.Properties;
import javax.rmi.*;
* @author jnc
public class TestDummySessionBean {
/** Creates a new instance of TestDummySessionBean */
public TestDummySessionBean() {
public void getHelloFromBean(){
EJBHome home = null;
InitialContext context = null;
Object objref = null;
try {
for(int i = 1; i<110;i++) {
context = new InitialContext();
System.out.println("Done with InitialContext " + context.toString());
System.out.println("In the the loop. Loop no = " + i);
objref = context.lookup("corbaname:iiop:arwen:13700#SessionEJBSession");
System.out.println("Done with Lookup " + context.toString());
context.close();
} // end of for loop
context.close();
} catch (Exception e) {
System.out.println("Exception is " + e.getMessage());
e.printStackTrace();
} // end of try-catch
* @param args the command line arguments
public static void main(String[] args) {
TestDummySessionBean myObject = new TestDummySessionBean();
myObject.getHelloFromBean();
}context.lookup("corbaname:iiop:arwen:13700#SessionEJBSession");Is it necessary to lookup everytime? You can cache the object and just retrieve it.
***Annie*** -
Hi:
i have an EJB client that tries to acces an EJB from another instance, the problem is
that the clients hangs while doing the jndo lookup.
her is where i try to get the context
public static Context getInitialContext() throws NamingException
System.out.println("Inicio - getInitialContext");
Hashtable env = new Hashtable();
// Oracle Application Server 10g connection details
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "sec");
env.put(Context.SECURITY_CREDENTIALS, "sec");
env.put(Context.PROVIDER_URL, "opmn:ormi://198.186.1.75:edeclarador/eDeclarador");
env.put("dedicated.rmicontext", "true");
System.out.println("Ambiente : "+env.toString());
return new InitialContext(env);
and here i do de lookup
Context context = getInitialContext();
ComunHome comunHome = (ComunHome)PortableRemoteObject.narrow(context.lookup("Comun"), ComunHome.class);
and it hangs :(
Any help would be nice.hi:
With the help found on this forum and that link:
http://matrix.csustan.edu/docs/oracle/oas/web.1012/b14012/ormi.htm
i solved my problem. when i turn on the rim debug and rmi vervose y found that
it hangs because it lookup to port 6000 and the rmi server port was listening on another.
On OAS i used opmnctl to Show the Selected RMI Port:
Processes in Instance: core817.dsunrdb22.us.oracle.com
----------------------------------------------+ ... +------
ias-component | process-type | pid | ... | ports
----------------------------------------------+ ... +------
WebCache | WebCacheAdmin | 28821 | ... | administration:4000
WebCache | WebCache | 28820 | ... | statistics:4002,invalidation:4001,http:7777
OC4J | home | 2012 | ... | iiop:3401,jms:3701,rmi:3201,ajp:3000
HTTP_Server | HTTP_Server | 28818 | ... | http2:7200,http1:7778,http:7200
dcm-daemon | dcm-daemon | 28811 | ... | N/A
LogLoader | logloaderd | N/A | ... | N/A
and i put the port in the PROVIDER URL and it works!
Saludos! -
Error while trying to connect to weblogic from remote client
Hi
I was trying to connect to JMX MBeanserver from a aremote client using some sample code that was posted. Ive tried even the samples that I found in the Admin Guide itself. Im not certain if any server configuration is needed. Ive tried the below with all three protocols t3, iiop, http with the same result. I had also enabled IIOP on the server through the console.
I get an error when trying to conenct using the JMXConnection Factory i.e. at the last line of the following code:
String protocol = "t3"; // can be t3, http, iiop
String hostname = "santapoco.eng";
int port = 7001;
String uri = "/jndi/"+"weblogic.management.mbeanservers.runtime";
JMXServiceURL serviceURL = new JMXServiceURL(protocol, hostname, port, uri);
Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, "weblogic");
h.put(Context.SECURITY_CREDENTIALS, "weblogic");
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES, "weblogic.management.remote");
JMXConnector connector =JMXConnectorFactory.connect(serviceURL, h);
The error is:
"Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
at weblogic.jrmp.Context.lookup(Context.java:189)"Pratima Gogineni <> writes:
This is what worked for me:
URI uri = new URI(args[0]);
JMXServiceURL serviceURL =
new JMXServiceURL(uri.getScheme(), uri.getHost(), uri.getPort(),
"/jndi/weblogic/management/mbeanservers/runtime");
Hashtable h = new Hashtable();
h.put(Context.SECURITY_PRINCIPAL, "system");
h.put(Context.SECURITY_CREDENTIALS, "ejb2come");
// String[] jmxCredentials = new String[]{ "system", "ejb2come" };
// h.put(JMXConnector.CREDENTIALS, jmxCredentials);
h.put(JMXConnectorFactory.PROTOCOL_PROVIDER_PACKAGES,
"weblogic.management.remote");
h.put(Context.PROVIDER_URL, args[0]);
// h.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.cosnaming.CNCtxFactory");
h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
// InitialContext ic = new InitialContext(h);
// ic.lookup("weblogic/management");
JMXConnector connector = JMXConnectorFactory.connect(serviceURL, h);
MBeanServerConnection connection = connector.getMBeanServerConnection();
NOTE this was with weblogic 91-- -
WSAD 5, xerces, datasource and classcastexception issue
I am running into an issue trying to run my code once I upgraded from WDAD 5.0 to WSAD 5.01. I am getting the error below when I try and connect to my DataSource. This all was working fine before I upgraded. It looks like an issue with the xerces.jar file because if I take out the JAXP stuff in the xerces.jar file I work fine. But I need the JAXP stuff because I am doing messaging. Anyone have any ideas?
[5/22/03 7:02:59:848 CDT] 2ec4c80 SystemOut O 2003.05.22 07:02:59.848--ServerSession(426724481)--Thread[asyncDelivery0,5,main]--Connection(47762586)--TopLink, version:TopLink - 9.0.3 (Build 423)
2003.05.22 07:02:59.848--ServerSession(426724481)--Thread[asyncDelivery0,5,main]--Connection(47762586)--connecting(DatabaseLogin(
platform => DB2Platform
user name => "ou79ecm"
datasource name => "jdbc/DB239DataSource"
[5/22/03 7:03:00:118 CDT] 2ec4c80 ConnectionFac I J2CA0122I: Resource reference jdbc/DB239DataSource could not be located, so default values of the following are used: [Resource-ref settings]
res-auth: 1 (APPLICATION)
res-isolation-level: 0 (TRANSACTION_NONE)
res-sharing-scope: true (SHAREABLE)
res-resolution-control: 999 (undefined)
[Other attributes]
isCMP1_x: false (not CMP1.x)
isJMS: false (not JMS)
[5/22/03 7:03:01:160 CDT] 2ec4c80 ConnectionFac E J2CA0009E: An exception occurred while trying to instantiate the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jdbc/DB239DataSource : java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
at java.lang.reflect.Method.invoke(Native Method)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
at java.lang.Thread.run(Thread.java:513)
[5/22/03 7:03:01:310 CDT] 2ec4c80 ConnectionFac A J2CA0013I: An exception occurred while trying to create ManagedConnectionFactory for DB239DataSource : java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
at java.lang.reflect.Method.invoke(Native Method)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
at java.lang.Thread.run(Thread.java:513)
[5/22/03 7:03:01:340 CDT] 2ec4c80 Helpers W NMSV0605W: A Reference object looked up from the context "localhost/nodes/localhost/servers/server1" with the name "jdbc/DB239DataSource" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl
Reference Factory Class Location URLs: <null>
Reference Class Name: DB239DataSource
Type: connectorName
Content: DB239DataSource
Type: classpath
Content: C:\Program Files\IBM\WebSphere Studio\runtimes\base_v5/lib/rsadapter.rar
Type: FactoryJndiName
Content: jdbc/DB239DataSource
Address Type: dd
AddressContents: ffffffac ffffffed 0 5 73 72 0 25 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 52 65 73 6f 75 72 63 65 ...
Address Type: poolProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 27 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
Address Type: configProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 23 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
Address Type: dsProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 74 69 6c 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a ...
Address Type: mcfProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 2d 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 61 6e 61 67 65 64 43 ...
Address Type: mbeanProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 1a 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 42 65 61 6e 50 72 6f ...
Exception data follows:
java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
at java.lang.reflect.Method.invoke(Native Method)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
at java.lang.Thread.run(Thread.java:513)
[5/22/03 7:03:01:891 CDT] 2ec4c80 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookup
Context name: localhost/nodes/localhost/servers/server1
Target name: jdbc/DB239DataSource
Other data:
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
at java.lang.reflect.Method.invoke(Native Method)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
at java.lang.Thread.run(Thread.java:513)
2003.05.22 07:03:02.111--ServerSession(426724481)--Thread[asyncDelivery0,5,main]--EXCEPTION [TOPLINK-7060] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
EXCEPTION DESCRIPTION: Cannot acquire data source [jdbc/DB239DataSource].
INTERNAL EXCEPTION: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl]LOCAL EXCEPTION STACK:
EXCEPTION [TOPLINK-7060] (TopLink - 9.0.3 (Build 423)): oracle.toplink.exceptions.ValidationException
EXCEPTION DESCRIPTION: Cannot acquire data source [jdbc/DB239DataSource].
INTERNAL EXCEPTION: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl]
at oracle.toplink.exceptions.ValidationException.cannotAcquireDataSource(Unknown Source)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
at java.lang.reflect.Method.invoke(Native Method)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
at java.lang.Thread.run(Thread.java:513)
INTERNAL EXCEPTION STACK:
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is java.lang.ClassCastException: org.apache.xerces.jaxp.SAXParserFactoryImpl
at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source)
at com.ibm.ejs.j2c.XMLReader.validate(XMLReader.java:673)
at com.ibm.ejs.j2c.XMLReader.init(XMLReader.java:241)
at com.ibm.ejs.j2c.XMLReader.<init>(XMLReader.java:165)
at com.ibm.ejs.j2c.ConnectorRuntime.getJ2C_Properties(ConnectorRuntime.java:341)
at com.ibm.ejs.j2c.poolmanager.PoolManager.<init>(PoolManager.java:541)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createCFD_Common(ConnectionFactoryBuilderImpl.java:699)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createConnectionFactoryDetails(ConnectionFactoryBuilderImpl.java:417)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1400)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1675)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1538)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1458)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1130)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:122)
at javax.naming.InitialContext.lookup(InitialContext.java:363)
at oracle.toplink.jndi.JNDIConnector.connect(Unknown Source)
at oracle.toplink.sessions.DatabaseLogin.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.internal.databaseaccess.DatabaseAccessor.connect(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.buildConnection(Unknown Source)
at oracle.toplink.threetier.ConnectionPool.startUp(Unknown Source)
at oracle.toplink.threetier.ServerSession.connect(Unknown Source)
at oracle.toplink.publicinterface.DatabaseSession.login(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at oracle.toplink.tools.sessionmanagement.SessionManager.getSession(Unknown Source)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getSession(ToplinkServerSessionFactory.java:121)
at com.deere.jdc.toplink.ToplinkServerSessionFactory.getClientSession(ToplinkServerSessionFactory.java:56)
at com.deere.jdc.component.rcts.dao.RCTSGateway.findDealerASMByDealerNumber(RCTSGateway.java:194)
at com.deere.jdc.component.rcts.service.RCTSService.getRCTSDealerASM(RCTSService.java:159)
at com.deere.jdc.component.rcts.adapter.SoapRCTSService.getRCTSDealerASM(SoapRCTSService.java:107)
at java.lang.reflect.Method.invoke(Native Method)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.invokeServiceMethod(RCTSMessageHandler.java:103)
at com.deere.jdc.component.rcts.messaging.RCTSMessageHandler.processMessage(RCTSMessageHandler.java:62)
at com.deere.jdc.mqseries.MQJMSMessageHandler.onMessage(MQJMSMessageHandler.java:122)
at com.ibm.mq.jms.MQQueueReceiver.receiveAsync(MQQueueReceiver.java:861)
at com.ibm.mq.jms.SessionAsyncHelper.run(SessionAsyncHelper.java:401)
at java.lang.Thread.run(Thread.java:513)This looks like a classPath issue.check ur runtime
class path and make sure xerces is before any other
parser(xml4j /oracleParser)
vasanth -
Weblogic deployer doesn't work under 9.2, driving me nutso! =P
I've tried everything trying to get the deploy/undeployer to work (tried http, t3 etc.)
Example ant task:
<target name="undeploy">
<path id="xdoclet.lib.path">
<fileset dir="${weblogic.lib.dir}">
<include name="*.jar"/>
</fileset>
</path>
<java classname="weblogic.Deployer" fork="true" maxmemory="256m" failonerror="true" classpathref="xdoclet.lib.path">
<arg line="-adminurl http://localhost:7001"/>
<arg line="-username weblogic"/>
<arg line="-password express1"/>
<arg line="-name t1scp3"/>
<arg value="-undeploy"/>
<arg value="-debug"/>
</java>
</target>
I've also tried using the ant task that comes with weblogic, but I always get this error! (I can ping the server using the ping class)
Any ideas? (Stack trace below)
Buildfile: C:\workspace\t1scp3\build.xml
undeploy:
[java] weblogic.Deployer invoked with options: -adminurl http://localhost:7001 -username weblogic -name t1scp3 -undeploy -debug
[java] [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE version V1_4 deployments
[java] [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at localhost:7001, as user weblogic
[java] [ServerConnectionImpl.getEnvironment():288] : setting environment
[java] [ServerConnectionImpl.getEnvironment():291] : getting context using http://localhost:7001
[java] [ServerConnectionImpl.getMBeanServer():239] : Connecting to MBeanServer at service:jmx:http://localhost:7001/jndi/weblogic.management.mbeanservers.domainruntime
[java] java.io.IOException
[java] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:135)
[java] at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:79)
[java] at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:326)
[java] at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServer(ServerConnectionImpl.java:240)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServerForType(ServerConnectionImpl.java:191)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:147)
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(WebLogicDeploymentManagerImpl.java:148)
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:118)
[java] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:84)
[java] at weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionHelper.java:432)
[java] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:302)
[java] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
[java] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[java] at weblogic.Deployer.run(Deployer.java:70)
[java] at weblogic.Deployer.main(Deployer.java:54)
[java] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at weblogic.jrmp.Context.lookup(Context.java:189)
[java] at weblogic.jrmp.Context.lookup(Context.java:195)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:351)
[java] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:126)
[java] ... 17 more
[java] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:273)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
[java] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
[java] at weblogic.jrmp.BaseRemoteRef.invoke(BaseRemoteRef.java:221)
[java] at weblogic.jrmp.RegistryImpl_Stub.lookup(Unknown Source)
[java] at weblogic.jrmp.Context.lookup(Context.java:185)
[java] ... 20 more
[java] Caused by: java.io.EOFException
[java] at java.io.DataInputStream.readByte(DataInputStream.java:243)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:215)
[java] ... 25 more
[java] [ServerConnectionImpl.close():334] : Closing DM connection
[java] [ServerConnectionImpl.close():354] : Unregistered all listeners
[java] weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 'http://localhost:7001': null. Ensure the url represents a running admin server and that the credentials are correct. If using http protocol, tunneling must be enabled on the admin server.
[java] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:314)
[java] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
[java] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[java] at weblogic.Deployer.run(Deployer.java:70)
[java] at weblogic.Deployer.main(Deployer.java:54)
[java] Caused by: javax.enterprise.deploy.spi.exceptions.DeploymentManagerCreationException: [J2EE Deployment SPI:260010]Unable to connect to 'http://localhost:7001' as user, 'weblogic'. Error received: null
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:121)
[java] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentManager(DeploymentFactoryImpl.java:84)
[java] at weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionHelper.java:432)
[java] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:302)
[java] ... 6 more
[java] Caused by: weblogic.deploy.api.spi.exceptions.ServerConnectionException: [J2EE Deployment SPI:260010]Unable to connect to 'http://localhost:7001' as user, 'weblogic'. Error received: null
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServer(ServerConnectionImpl.java:251)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServerForType(ServerConnectionImpl.java:191)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectionImpl.java:147)
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(WebLogicDeploymentManagerImpl.java:148)
[java] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeploymentManagerImpl.java:118)
[java] ... 9 more
[java] Caused by: java.io.IOException
[java] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:135)
[java] at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProviderBase.java:79)
[java] at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.java:326)
[java] at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)
[java] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServer(ServerConnectionImpl.java:240)
[java] ... 13 more
[java] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException]
[java] at weblogic.jrmp.Context.lookup(Context.java:189)
[java] at weblogic.jrmp.Context.lookup(Context.java:195)
[java] at javax.naming.InitialContext.lookup(InitialContext.java:351)
[java] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProviderBase.java:126)
[java] ... 17 more
[java] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[java] java.io.EOFException
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:273)
[java] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
[java] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
[java] at weblogic.jrmp.BaseRemoteRef.invoke(BaseRemoteRef.java:221)
[java] at weblogic.jrmp.RegistryImpl_Stub.lookup(Unknown Source)
[java] at weblogic.jrmp.Context.lookup(Context.java:185)
[java] ... 20 more
[java] Caused by: java.io.EOFException
[java] at java.io.DataInputStream.readByte(DataInputStream.java:243)
[java] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:215)
[java] ... 25 more
BUILD FAILED
C:\workspace\t1scp3\build.xml:229: Java returned: 1
Total time: 10 seconds<p>Can you add the following to your WLS startup options (or enable the relevant debug subsystems using the WLS9.2 console):</p>
<ul>
<li>weblogic.debug.DebugConnection</li>
<li>weblogic.debug.DebugRouting</li>
<li>weblogic.debug.DebugMessaging</li>
<li>weblogic.debug.isLogRemoteExceptionsEnabled</li>
</ul>
<p>and post the your server log here as well.</p>
<p>Also where did you get the task classes from?</p>
<p>
Hussein Badakhchani
London Middleware
</p>
Edited by hoos at 01/07/2007 3:41 AM -
JCA - Failed calling get method getThreadSecurity on the ManagedConnectionF
Hi All,
This is my first post with the SDN, hope I could see and extend helping hands in form of technology and solutions
My problem
=============
I am new to JCA.I am trying to deploy the helloworldra.ear provided by the IBM site.I deployed the resoource adapter and created a connectionFactory named "HelloWorld"(jndi).I get the below mentioned exception when I do
ConnectionFactory cxFactory = (ConnectionFactory) context.lookup("java:comp/env/HelloWorld");
Kindly chek into the exception and provide me with the solution.
Thanks in Advance
KABA
Exceptions Snapshot
==================
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O Populating Context
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O #################### JNDI Context Contents ####################
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.hostname.normalizer ---:-- com.ibm.ws.naming.util.DefaultHostnameNormalizer
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O java.naming.factory.initial ---:-- com.ibm.websphere.naming.WsnInitialContextFactory
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.name.syntax ---:-- jndi
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.namespace.connection ---:-- lazy
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.ws.naming.ldap.ldapinitctxfactory ---:-- com.sun.jndi.ldap.LdapCtxFactory
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.cacheobject ---:-- populated
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.namespaceroot ---:-- defaultroot
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.ws.naming.wsn.factory.initial ---:-- com.ibm.ws.naming.util.WsnInitCtxFactory
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.maxcachelife ---:-- 0
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.maxentrylife ---:-- 0
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O com.ibm.websphere.naming.jndicache.cachename ---:-- providerURL
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O java.naming.provider.url ---:-- corbaloc:rir:/NameServiceServerRoot
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O java.naming.factory.url.pkgs ---:-- com.ibm.ws.runtime:com.ibm.ws.naming
[7/7/06 14:38:27:624 EDT] 5a004128 SystemOut O #################### JNDI Context Contents END ####################
[7/7/06 14:38:28:718 EDT] 5a004128 ConnectionFac E J2CA0066E: Failed calling get method getThreadSecurity on the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jca/HelloWorld with the value <null>. Exception is java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[7/7/06 14:38:28:812 EDT] 5a004128 ConnectionFac E J2CA0009E: An exception occurred while trying to instantiate the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jca/HelloWorld : java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[7/7/06 14:38:28:859 EDT] 5a004128 Helpers W NMSV0605W: A Reference object looked up from the context "localhost/nodes/localhost/servers/server1" with the name "jca/HelloWorld" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl
Reference Factory Class Location URLs: <null>
Reference Class Name: HelloWorld
Type: connectorName
Content: HelloWorld
Type: classpath
Content: C:\Program Files\IBM\WebSphere Studio\Application Developer\v5.1\runtimes\base_v5/lib/rsadapter.rar
Type: FactoryJndiName
Content: jca/HelloWorld
Address Type: dd
AddressContents: ffffffac ffffffed 0 5 73 72 0 25 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 52 65 73 6f 75 72 63 65 ...
Address Type: poolProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 27 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
Address Type: configProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 23 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 43 6f 6e 6e 65 63 74 6f ...
Address Type: mmProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 14 6a 61 76 61 2e 75 74 69 6c 2e 50 72 6f 70 65 72 74 69 65 73 39 12 ffffffd0 7a ...
Address Type: mbeanProps
AddressContents: ffffffac ffffffed 0 5 73 72 0 1a 63 6f 6d 2e 69 62 6d 2e 65 6a 73 2e 6a 32 63 2e 4d 42 65 61 6e 50 72 6f ...
Exception data follows:
java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[7/7/06 14:38:28:953 EDT] 5a004128 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookup
Context name: localhost/nodes/localhost/servers/server1
Target name: jca/HelloWorld
Other data:
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFactoryBuilderImpl.java:1747)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getObjectInstance(ConnectionFactoryBuilderImpl.java:1188)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1762)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1615)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1525)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1225)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory$1.run(IndirectJndiLookupObjectFactory.java:293)
at java.security.AccessController.doPrivileged(Native Method)
at com.ibm.ws.naming.util.IndirectJndiLookupObjectFactory.getObjectInstance(IndirectJndiLookupObjectFactory.java:144)
at com.ibm.ws.util.ResRefJndiLookupObjectFactory.getObjectInstance(ResRefJndiLookupObjectFactory.java:127)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:135)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1227)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1203)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1257)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.ibm.ssya.helloworldra.servlets.HelloWorldBean.execute(HelloWorldBean.java:81)
at org.apache.jsp._HelloWorldResults._jspService(_HelloWorldResults.java:105)
at com.ibm.ws.webcontainer.jsp.runtime.HttpJspBase.service(HttpJspBase.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:357)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:675)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:773)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.dispatch(HelloWorldController.java:101)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.performTask(HelloWorldController.java:66)
at com.ibm.ssya.helloworldra.servlets.HelloWorldController.doPost(HelloWorldController.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
at com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServlet.java:313)
at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:948)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:530)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:176)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:79)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:201)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:114)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:186)
at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:610)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:431)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:593)
[7/7/06 14:38:29:031 EDT] 5a004128 ConnectionFac E J2CA0066E: Failed calling get method getThreadSecurity on the ManagedConnectionFactory class com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource jca/HelloWorld with the value <null>. Exception is java.lang.reflect.InvocationTargetException: java.lang.NullPointerException
at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.getThreadSecurity(WSManagedConnectionFactoryImpl.java:612)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.getThreadSecurity(ConnectionFactoryBuilderImpl.java:2520)
at com.ibm.ejs.j2c.ConnectionFactoryBuilderImpl.createMCFandPM(ConnectionFPersianKamran wrote:
folks.. i am sending my class object on Sockets from client to Server (i am implementing Seriablizable Interface).
No your aren't.
You are sending the data in the class.
That is what serialization does. (And actually not all data can be sent either.)
When i get the object on server, i am able to print all its fields and methods... But i have one problem. I want to invoke a simple static method that just prints "hello".. The method on client that i am trying to invoke is....You probably either need stop attempting that or re-architect the solution.
It is possible to send a class (not data) to another computer and that computer runs it. That is how applets work.
But for that to work you must send the class. And deal with how the VM loads and unloads classes (not data) as well. -
Error using wldeploy in unix environment
I am trying to use wldeploy ant task to deploy and undeploy applications from my server in a unix environment, and keep getting errors there, and not locally on a XP development workstation. Below are my buildfile and the error that I am getting. Anyone have any ideas as to what may be wrong?
build.xml
<target name="undeploy" description="Undeploys app">
<wldeploy user="${user}" password="${password}"
adminurl="${adminurl}" remote="true"
action="stop" name="${appname}" debug="true"
verbose="true"/>
</target>
And here is the error:
[wldeploy] weblogic.Deployer -debug -remote -verbose -noexit -name ${appname} -adminurl iiop://${host}:${port} -user ${user} -password ${password} -stop
[wldeploy] weblogic.Deployer invoked with options: -debug -remote -verbose -noexit -name broker-co
ntact.ear -adminurl iiop://${host}:${port} -user ${user} -stop
[wldeploy] [WebLogicDeploymentManagerImpl.<init>():103] : Constructing DeploymentManager for J2EE v
ersion V1_4 deployments
[wldeploy] [WebLogicDeploymentManagerImpl.getNewConnection():146] : Connecting to admin server at a
lice.healthpartners.com:8001, as user system
[wldeploy] [ServerConnectionImpl.getEnvironment():288] : setting environment
[wldeploy] [Debug.say():43] : getting context using iiop://alice.healthpartners.com:8001
[wldeploy] [Debug.say():43] : Connecting to MBeanServer at service:jmx:iiop://${host}:${port}/jndi/weblogic.management.mbeanservers.domainruntime
[wldeploy] java.io.IOException
[wldeploy] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProvide
rBase.java:135)
[wldeploy] at weblogic.management.remote.common.ClientProviderBase.newJMXConnector(ClientProvid
erBase.java:79)
[wldeploy] at javax.management.remote.JMXConnectorFactory.newJMXConnector(JMXConnectorFactory.j
ava:341)
[wldeploy] at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:262)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServer(Serve
rConnectionImpl.java:240)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.getMBeanServerForTyp
e(ServerConnectionImpl.java:191)
[wldeploy] at weblogic.deploy.api.spi.deploy.internal.ServerConnectionImpl.init(ServerConnectio
nImpl.java:147)
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.getNewConnection(Web
LogicDeploymentManagerImpl.java:148)
[wldeploy] at weblogic.deploy.api.spi.deploy.WebLogicDeploymentManagerImpl.<init>(WebLogicDeplo
ymentManagerImpl.java:118)
[wldeploy] at weblogic.deploy.api.spi.factories.internal.DeploymentFactoryImpl.getDeploymentMan
ager(DeploymentFactoryImpl.java:84)
[wldeploy] at weblogic.deploy.api.tools.SessionHelper.getDeploymentManager(SessionHelper.java:4
32)
[wldeploy] at weblogic.deploy.api.tools.deployer.Jsr88Operation.connect(Jsr88Operation.java:302
[wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.perform(Deployer.java:137)
[wldeploy] at weblogic.deploy.api.tools.deployer.Deployer.runBody(Deployer.java:88)
[wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[wldeploy] at weblogic.utils.compiler.Tool.run(Tool.java:115)
[wldeploy] at weblogic.Deployer.run(Deployer.java:70)
[wldeploy] at weblogic.Deployer.mainWithExceptions(Deployer.java:62)
[wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[wldeploy] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
[wldeploy] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java
:43)
[wldeploy] at java.lang.reflect.Method.invoke(Method.java:615)
[wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.invokeMain(WLDeploy.java:419)
[wldeploy] at weblogic.ant.taskdefs.management.WLDeploy.execute(WLDeploy.java:349)
[wldeploy] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
[wldeploy] at org.apache.tools.ant.Task.perform(Task.java:364)
[wldeploy] at org.apache.tools.ant.Target.execute(Target.java:341)
[wldeploy] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[wldeploy] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
[wldeploy] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[wldeploy] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:4
0)
[wldeploy] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
[wldeploy] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[wldeploy] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[wldeploy] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[wldeploy] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
[wldeploy] Caused by: javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
[wldeploy] java.io.EOFException]
[wldeploy] at weblogic.jrmp.Context.lookup(Context.java:189)
[wldeploy] at weblogic.jrmp.Context.lookup(Context.java:195)
[wldeploy] at javax.naming.InitialContext.lookup(InitialContext.java:363)
[wldeploy] at weblogic.management.remote.common.ClientProviderBase.makeConnection(ClientProvide
rBase.java:126)
[wldeploy] ... 35 more
[wldeploy] Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nest
ed exception is:
[wldeploy] java.io.EOFException
[wldeploy] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:293)
[wldeploy] at sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:190)
[wldeploy] at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:321)
[wldeploy] at weblogic.jrmp.BaseRemoteRef.invoke(BaseRemoteRef.java:221)
[wldeploy] at weblogic.jrmp.RegistryImpl_Stub.lookup(Unknown Source)
[wldeploy] at weblogic.jrmp.Context.lookup(Context.java:185)
[wldeploy] ... 38 more
[wldeploy] Caused by: java.io.EOFException
[wldeploy] at java.io.DataInputStream.readByte(DataInputStream.java:269)
[wldeploy] at sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:234)
[wldeploy] ... 43 more
[wldeploy] [Debug.say():43] : Closing DM connection
[wldeploy] [Debug.say():43] : Unregistered all listeners
[wldeploy] weblogic.deploy.api.tools.deployer.DeployerException: Unable to connect to 'iiop://${host}:${port}': null. Ensure the url represents a running admin server and that the crede
ntials are correct. If using http protocol, tunneling must be enabled on the admin server.
Thanks.
ScottHi Richard,
I had the same issue using Eclipse. I just tried to run the
ant script outside of Eclipse and it worked fine.
This is an Eclipse-Ant Class Loader issue.
In order to make it work in Eclipse, You have to :
1. Open the External Tool Run Configuration.
2. Select your Ant script.
3. Select JRE Tab.
4. In Runtime JRE section, choose Seperate JRE.
Hope this helps !
Eric -
Ejb-jar.xml and orion-ejb-jar.xml configuration issue
Chris,
We have an application that uses the Oracle 10g Application Server and WebSphere MQ v5.3 w/ fixpack 9.
Our application is a J2EE messaging system which essentially consists of Message Driven Beans, the EJB
realization of the J2EE Java Message Service (JMS) API. Our application has Message Driven Beans which
listen to queues and send messages to queues -- a simple messaging system. Currently we can listen to queues, but
cannot send messages to queues in the Oracle 10g Application Server environment.
Any J2EE application server has its own implementation of Java Naming Directory Interface (JNDI) API that
deployed J2EE applications utilize to lookup resources such as Data Sources, JMS Destinations (i.e. MQ Queue),
JMS QueueConnectionFactories (i.e. MQ QManagers).
Our application uses the 3rd party JMS Provider, WebSphere MQ.
MQ ships with a JMSAdmin tool which allows one to create JMS administered objects (i.e. objects a java
application searches for in some JNDI directory) that reside in some JNDI context. We create a JNDI context for
MQ resources, queues and QManagers. We configure the MQ provided
JMSAdmin tool with two property name/value pairs:
PROVIDER_URL=file:/opt/mqm/JNDI-Directory
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
A resultant .bindings file is created in /opt/mqm/JNDI-Directory which represents our JDNI context
containing our JMS administered objects. A standalone java application that needs to directly access this
JNDI context can simply conduct a JNDI lookup on the following context: "java:comp/resource/MQSeries/". An
example of how a standalone application would lookup a JMS administered object named "qNumber1" would be to
lookup "java:comp/resource/MQSeries/qNumber1". This lookup would result in the standalone java application
having a JMS reference to an MQ Queue.
There is a major difference in how an enterprise EJB application deployed into a J2EE Container (Oracle 10g App Server)
conducts a JNDI lookup on a 3rd party resource such as MQ as a JMS Provider. A typical EJB application deployed
into a J2EE container as an .ear (enterprise archive) file has implicit access to the application server's own
JNDI context. This JNDI context is usually "java:comp/env/". Looking up the Application Server's own Data Source or
it's own JMS Resources is easy. An application that needs references to these Application Server provided resources
simply conducts a lookup for "java:comp/env/jms/someQ" or "java:comp/env/jdbc/myDataSource".
The problem we face is mapping our MQ JNDI context to the Oracle App Server's own JNDI context. We believe this is
accomplished through mappings defined in both the ejb-jar.xml (EJB Descriptor) and the application server specific
counterpart, orion-ejb-jar.xml. Note that Oracle 10g Application Server uses the popular orion J2EE container for
hosting J2EE enterpise applications.
Our Message Driven Beans (MDBs)currently listen to the Queue at the JNDI location "prodQ". Our problem is that we cannot
get our MDB to send messages to any queues. Note that the MQ implementation of the queues and Queue Managers work
flawlessly with standalone java applications. It's safe to say that the MQ objects are working.
We are looking for a solid example of how the ejb-jar.xml and the orion-ejb-jar.xml map 3rd party JMS provider
JNDI locations to the App Server's JNDI context.
Below is how we have attempted to configure our own ejb-jar.xml and orion-ejb-jar.xml:
ejb-jar.xml begin >>>>>>>>>>>>>>><?xml version = '1.0' encoding = 'UTF-8'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<display-name>Production Message Driven Bean</display-name>
<enterprise-beans>
<message-driven>
<display-name>prodMdb</display-name>
<ejb-name>prodMdb</ejb-name>
<ejb-class>message.handler.AIDMSMessageConsumerBean</ejb-class>
<transaction-type>Bean</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>prodQCF</res-ref-name>
<res-type>javax.jms.QueueConnectionFactory</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodQ</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
<resource-ref>
<res-ref-name>prodR</res-ref-name>
<res-type>javax.jms.Queue</res-type>
<res-auth>Application</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
</message-driven>
</enterprise-beans>
</ejb-jar>
<<<<<<<< ejb-jar.xml end <<<<<<<<<<<<<<<<<<<<<<<<<<<<<
begin orion-ejb-jar.xml >>>>>>>>>>>>>>>>>>>>>>>>>>><orion-ejb-jar>
<enterprise-beans>
<message-driven-deployment name="prodMdb" connection-factory-location="java:comp/resource/MQSeries/prodQCF" destination-location="java:comp/resource/MQSeries/prodR">
<resource-ref-mapping location="prodQ" name="prodQ">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
<resource-ref-mapping location="prodR" name="prodR">
<lookup-context location="java:comp/resource/MQSeries/" >
<!-- <context-attribute name="java.naming.factory.initial"
value="com.sun.jndi.fscontext.RefFSContextFactory" /> -->
</lookup-context>
</resource-ref-mapping>
</message-driven-deployment>
</enterprise-beans>
</orion-ejb-jar>
<<<<<<<<< end orion-ejb-jar.xml <<<<<<<<<<<<<<<<<<<<<<<<If you look at the contents of a deployment plan (Plan.xml) when you have it generated
<deployment-plan ...>
<module-override>
<module-name>ejb.jar</module-name>
<module-type>ejb</module-type>
<module-descriptor external="true">
<root-element>weblogic-ejb-jar</root-element>
<uri>META-INF/weblogic-ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>ejb-jar</root-element>
<uri>META-INF/ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>persistence-configuration</root-element>
<uri>META-INF/persistence-configuration.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>persistence</root-element>
<uri>META-INF/persistence.xml</uri>
</module-descriptor>
</module-override>
</deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
external (see external=false)
The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
configurations by using a deployment plan, instead of having to extract the contents from the jar file
and then repackage it again.
No need to worry about a clustered environment, you can place the jar and the deployment plan
on the server where the admin server is located, when you deploy an application you deploy it to
the cluster and everything is taken care off.
More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html -
Connection pool error with oracle 11g and weblogic 10
Hi,
my code is:
public Connection getConnection() {
properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.T3InitialContextFactory");
//properties.put(Context.SECURITY_PRINCIPAL, "weblogic");
//properties.put(Context.SECURITY_CREDENTIALS, "weblogic");
properties.put(Context.PROVIDER_URL, "t3://172.23.61.214:7001/");
try {
initialContext = new InitialContext(properties);
datasource = (DataSource) initialContext.lookup("sample_jndi");
try {
connection = datasource.getConnection();
} catch (SQLException e) {
e.printStackTrace();
} catch (NamingException e) {
e.printStackTrace();
return connection;
it is giving Exception at line " connection = datasource.getConnection(); "
Exception is:
javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
at weblogic.jrmp.Context.lookup(Context.java:189)
at weblogic.jrmp.Context.lookup(Context.java:195)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.code.sample.connectionDB.JDBCConnectionPool.getConnection(JDBCConnectionPool.java:35)
at com.code.sample.connectionDB.JDBCConnectionPool.main(JDBCConnectionPool.java:52)
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at weblogic.jrmp.Context.lookup(Context.java:185)
... 4 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(Unknown Source)
... 9 more
Please Advice.... ThanksI removed the "/" and tried..
But the exception is same:
javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
at weblogic.jrmp.Context.lookup(Context.java:189)
at weblogic.jrmp.Context.lookup(Context.java:195)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.code.sample.connectionDB.JDBCConnectionPool.getConnection(JDBCConnectionPool.java:35)
at com.code.sample.connectionDB.JDBCConnectionPool.main(JDBCConnectionPool.java:52)
Caused by: java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException
at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
at sun.rmi.server.UnicastRef.newCall(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at weblogic.jrmp.Context.lookup(Context.java:185)
... 4 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readByte(Unknown Source)
... 9 more -
Com.sap.portal.pcm.system.System class???
Which jar contains com.sap.portal.pcm.system.System class? I am doing a JNDI lookup & context.lookup(SystemID) returns this class com.sap.portal.pcm.system.System.
I am trying to lookup systems in the system landscape directory.
I am on SP9.Hi Sam,
You can find it in the com.sap.portal.ivs.systemlandscapeervice_core.jar
The location of the file is under
\usr\sap\<SID>\JC00\j2ee\cluster\server0\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.portal.ivs.systemlandscapeervice\private\lib\com.sap.portal.ivs.systemlandscapeervice_core.jar
Regards
Prakash -
Exception when running WLST in Eclipse - Please Help!!!
Hello,
I am trying to get get a WLST online connection via a java class, but I am getting an exception when trying to connect to an admin server instance:
<br>
<br><b>javax.naming.CommunicationException [Root exception is java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is:
java.io.EOFException]
at weblogic.jrmp.Context.lookup(Context.java:189)
at weblogic.jrmp.Context.lookup(Context.java:195)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at weblogic.management.scripting.WLSTHelper.initDeprecatedConnection(WLSTHelper.java:546)
at weblogic.management.scripting.WLSTHelper.initConnections(WLSTHelper.java:285)
<br>
<br>
The CompatabilityMBeanServer is not initialized properly. This might happen if the CompatabilityMBeanServer is disabled via the JMXMBean.To view the real exception use dumpStack()
WLST detected that the RuntimeMBeanServer is not enabled. This might
happen if the RuntimeMBeanServer is disabled via the JMXMBean.
Please ensure that this MBeanServer is enabled. Online WLST cannot function
without this MBeanServer.</b>
<br>
<br>
I am basically trying to run the following WLST command in java:
<b>connect('weblogic','weblogic','t3://localhost:7201')</b>
<br>
<br>
Here is the java block that I call to create the connection with the WLSTIterpreter:
<br>
<br>
<b>StringBuffer buffer = new StringBuffer();
buffer.append("connect('weblogic','weblogic','t3://localhost:7201')\n"); System.out.println(buffer.toString());
<br>
INTERPRETER.exec(buffer.toString());</b>
<br>
<br>
My admin server is running at this address and the CompatabilityMBeanServer is enabled. The strange thing this is that I am able to run the WLST via the command line and the connection is successful with no problems. This leads me to believe that there is something wrong with my classpath/environment that I have setup in Eclipse but I am not sure.
Any ideas on where I went wrong??? Please help!
Thanks :)
PS. I am running WebLogic 9.1 and java 150_06
Message was edited by:
rogaljoI also have a similar issue (JNDI lookup works on the command line but not in Eclipse).
I posted another topic regarding this today with the title:
"CommunicationException ..."
In the groups:
weblogic...jndi
weblogic...jdbc -
Attempted to use a 5.0 DataSource outside of a 2.3 servlet
I am using WAS 5.0 with Oracle 9.2 . I cannot get a servlet to work with the datasource 5.0 . Any ideas??
The message I get is :
[2/26/04 11:17:28:984 GMT-06:00] 20bfba44 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookup
Context name: localhost/nodes/localhost/servers/server1
Target name: jdbc/WMBDatasource
Other data:
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is java.lang.Exception: Attempted to use a 5.0 DataSource outside of a 2.3 servlet
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1179)
My Servlet code is :
public class SimpleServlet extends HttpServlet {
public void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException
javax.sql.DataSource ds = null;
java.sql.Connection con = null;
java.io.PrintWriter out = resp.getWriter();
resp.setContentType("text/html");
try
out.println("Looking up DataSource<br>");
javax.naming.InitialContext ctx = new javax.naming.InitialContext();
ds = (javax.sql.DataSource) ctx.lookup("jdbc/WMBDatasource");
out.println("Getting connection<br>");
con = ds.getConnection();
con.close();
catch (Exception e)
e.printStackTrace(out);
out.println("Done<br>");hi vijay ,
i am using wasd5.1 ,and i am trying to access database thru datasource and i had created one javawebapplication and one server(test enviroument with data source ), and i had created this class inside web application, and i am running this class as a java application , but i am getting output like
Before Context
After Context
In Exception
com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. [Root exception is java.lang.Exception: Failed security check. Client is not permitted to create connection factory jdbc/db]
please help me to get out of this problem
/*please see code first*/
import java.sql.SQLException;
import java.util.Properties;
import java.sql.Connection;
import javax.naming.*;
import javax.sql.DataSource;
import java.sql.DriverManager;
import java.util.*;
public class checkclass
//private static String OWD2_DATASOURCE ="jdbc/db";
private static String INITIAL_CONTEXT_FACTORY "com.ibm.websphere.naming.WsnInitialContextFactory";
public static void main (String args[])
try{
Hashtable jndiProperties = new Hashtable();
jndiProperties.put(Context.INITIAL_CONTEXT_FACTORY,INITIAL_CONTEXT_FACTORY);
jndiProperties.put(Context.PROVIDER_URL,"iiop://localhost:2809");
jndiProperties.put(Context.REFERRAL, "throw");
System.out.println("Before Context");
javax.naming.Context ctx = new javax.naming.InitialContext(jndiProperties);
System.out.println("After Context");
DataSource ds = (javax.sql.DataSource)ctx.lookup("jdbc/db");
ctx.close();
System.out.println("After DataSource");
Connection con = ds.getConnection();
System.out.println("After Getting Connection");
con.close();
System.out.println("After Closing Connection");
catch(Exception e)
System.out.println("In Exception");
System.out.println(e);
}
Maybe you are looking for
-
Canon MF4150 not compatible with Lion.
Hello, I upgraded to Lion and since my Canon Image Class MF4150 doesn't want to print anymore. I checked the Canon's website and no drivers are out yet to support Lion. Canon UFR II Driver Error : Printer open failed.: -9781 Anyone have a workaround
-
Hi Everyone, I'm just about to connect up two SBS 2011 Servers with the same server name but on different subnets & domains over a VPN. So for example both servers will have the name Server01, one would have an ip address of 192.16
-
Static Decimal value in insert query
HI am going to insert decimal value in table but i got this error" Arithmetic overflow error converting numeric to data type numeric." HERE val one is a decimal value how can do this? INSERT INTO TBL(CON,VAL) SELECT ID,'2.0' FROM TBL1
-
How to check who locked the Tcode in SM01
Hi to all experts, Is there a way to check who locked the Tcode in SM01 or in table TSTC? Thanks in advance. BR, Nancy
-
ColdFusion Builder plugin console
I just don't understand what I am doing wrong here. I updated ColdFusion builder as a plugin installed in 3.5.1. I also have Flex 3 /subclipse and a few other plugins installed. When I restart my localhost or want to view orm sql logged to the consol