EJb 3.0 com.ibm.mq.jms.MQQueueConnectionFactory
Hi All
I see this error
[EJB:011013]The Message-Driven EJB attempted to connect to the JMS connection fa
ctory with the JNDI name:xxxx.ccerqcf. However, the object with th
e JNDI name xxxx.ccerqcf is not a JMS connection factory. NestedEx
ception Message is :com.ibm.mq.jms.MQQueueConnectionFactory
When using MDB/ EJB 3.0 in WLS 10.0 Mp2
When I use EJB 2.x I don't see the issue, can ejb 3.o read weblogic-ejb-jar.xml for its connection factory?
Is there any debug flag to see a better exception
This is a MDB intended to listen to message from IBM MQ server using a foreign server configured in the console
Edited by: user12297324 on Mar 15, 2010 3:47 PM
Edited by: user12297324 on Mar 15, 2010 4:04 PM
EJB 2.0
import javax.ejb.*;
import javax.jms.*;
public class FOTSysInqMsgBean implements MessageDrivenBean, MessageListener
// private static Logger logger = Logger.getLogger(FOTSysInqMsgBean.class);
MessageDrivenContext messageDrivenContext;
public void ejbActivate(){}
public void ejbRemove(){}
public void ejbPassivate(){}
public void ejbCreate() throws CreateException {}
// This is the key onMessage method
public void onMessage(Message msg)
//if (logger.isInfoEnabled()) logger.info("Enter MDB onMessage");
// byte buf[] = new byte[1000];
// int length = 0;
String inString = null;
String jmsMsgId = null;
try
if(msg instanceof TextMessage)
TextMessage tm = (TextMessage) msg;
inString = tm.getText();
jmsMsgId = tm.getJMSMessageID();
System.out.print(inString);
//MQMessageFormatter.parse(inString, jmsMsgId);
//else
//System.out.println("Is not instanceOf TextMessage");
// if (logger.isInfoEnabled()) logger.info("Not instanceOf TextMessage");
catch(Exception ex)
System.out.println("Error IncomingMessage is *********************" +ex);
//if (logger.isInfoEnabled())
// logger.info("FOTSysInqMsgBean === " + ex + " === in Bean class Message method");
//if (logger.isInfoEnabled()) logger.info("IncomingMessage:" + inString);
// if (logger.isInfoEnabled()) logger.info("Exit MDB onMessage");
//System.out.println("IncomingMessage is *********************" +inString);
public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
this.messageDrivenContext = messageDrivenContext;
EJB 3.0
package foo;
import javax.annotation.Resource;
//import javax.ejb.*;
import javax.ejb.MessageDriven;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDrivenContext;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
import javax.jms.MessageListener;
import javax.jms.Message;
import javax.jms.TextMessage;
* MDB asynchronously feeds the new added reviews to subscribers.
@MessageDriven
( name = "FOTSysInqMsgBean3", //,mappedName = "wholesale.ccer.fjms.maint.rsps.q1",
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue")
EJB 3.0
public class FOTSysInqMsgBean3 implements MessageListener
// MessageDrivenContext messageDrivenContext;
@Resource MessageDrivenContext messageDrivenContext;
//public void ejbActivate(){}
//public void ejbRemove(){}
//public void ejbPassivate(){}
//public void ejbCreate() throws CreateException {}
// This is the key onMessage method
public void onMessage(Message msg)
// if (logger.isInfoEnabled()) logger.info("Enter MDB onMessage");
// byte buf[] = new byte[1000];
// int length = 0;
String inString = null;
String jmsMsgId = null;
try
if(msg instanceof TextMessage)
TextMessage tm = (TextMessage) msg;
inString = tm.getText();
jmsMsgId = tm.getJMSMessageID();
// if (logger.isInfoEnabled()) logger.info("MQ Message Class:" + msg.getClass());
// if (logger.isInfoEnabled()) logger.info("MQ Message Object:" + msg);
// if (logger.isInfoEnabled()) logger.info("MQ Message Id:" + jmsMsgId);
// MQMessageFormatter.parse(inString, jmsMsgId);
else
//System.out.println("Is not instanceOf TextMessage");
// if (logger.isInfoEnabled()) logger.info("Not instanceOf TextMessage");
catch(Exception ex)
//System.out.println("Error IncomingMessage is *********************" +ex);
//if (logger.isInfoEnabled())
// logger.info("FOTSysInqMsgBean === " + ex + " === in Bean class Message method");
// if (logger.isInfoEnabled()) logger.info("IncomingMessage:" + inString);
// if (logger.isInfoEnabled()) logger.info("Exit MDB onMessage");
//System.out.println("IncomingMessage is *********************" +inString);
/*public void setMessageDrivenContext(MessageDrivenContext messageDrivenContext)
this.messageDrivenContext = messageDrivenContext;
both uses the same weblogic-ejb-jar.xml
Similar Messages
-
JMS Receiver Adapter - com.ibm.websphere.naming.WsnInitialContextFactory
Hello experts,
I am trying to configure JMS Adapter to Access Websphere Application Server via JNDI. The configuration is as follow:
Initial Context Factory: com.ibm.websphere.naming.WsnInitialContextFactory
Connection Factory: jms/messageQueueCF
Server URL: iiop://ammtnode.iubs.intra:2809/
Queue Name: jms/EXT_INPUT_QUEUE
I deployed all required jar files but Iu2019m still unable to connect to WAS because adapter cannot initialize ORB:
javax.naming.NamingException: Failed to initialize the ORB
I wrote a small java class to check where the problem was:
============================================================================
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://ammtnode.iubs.intra:2809/");
env.put("java.naming.corba.orb",org.omg.CORBA.ORB.init((String[])null,null));
Context jndiContext = null;
try {
jndiContext = new InitialContext(env);
ConnectionFactory connectionFactory = (ConnectionFactory) jndiContext.lookup("jms/messageQueueCF");
Connection qConn = connectionFactory.createConnection();
Session qSession = qConn.createSession(false,Session.AUTO_ACKNOWLEDGE);
Queue q = (Queue) jndiContext.lookup("jms/EXT_INPUT_QUEUE");
MessageProducer producer = qSession.createProducer(q);
TextMessage message = qSession.createTextMessage();
message.setText(text);
producer.send(message);
producer.close();
qSession.close();
qConn.close();
} catch (Exception e) {
e.printStackTrace();
============================================================================
I got the same error until I wrote this line:
env.put("java.naming.corba.orb",org.omg.CORBA.ORB.init((String[])null,null));
And everything worked fine. Now I want to do the same in my JMS Receiver adapter but I donu2019t know how to introduce this line in the Initial Context Environment. I tried as JMS additional parameters and additional properties as well. However, nothing worked. Does anybody know what Iu2019m doing wrong?
Thank you in advance!Here I post the entire error:
0#0#Warning##Java###Catching #1#com.sap.aii.adapter.jms.api.connector.ConnectorException: Error looking up connection fact
oryjms/messageQueueCF, for profile: ConnectionProfile of channel: CC_I002_AMM_JmsReceiveron node: 5949650 having object id: 0
360697bc61b3666aba07a2708ca095a: javax.naming.NamingException: Failed to initialize the ORB
at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:134)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.doConnect(ConnectorImpl.java:247)
at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.doConnect(JndiConnectorImpl.java:185)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connectIfDisconnected(ConnectorImpl.java:170)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connect(ConnectorImpl.java:153)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.doStart(ChannelImpl.java:279)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.start(ChannelImpl.java:166)
at com.sap.aii.adapter.jms.core.channel.AdapterImpl$1.run(AdapterImpl.java:411)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
Caused by: javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: class
com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incompatible with class com.ibm.CORBA.iiop.ORB:libra
ry:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClassLoaderAT131b92e6ATalive]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:364)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:421)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:130)
... 11 more
Caused by: java.lang.ClassCastException: class com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incom
patible with class com.ibm.CORBA.iiop.ORB:library:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClass
LoaderAT131b92e6ATalive
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:356)
... 19 more
Caused by:
javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: class com.sap.eng
ine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incompatible with class com.ibm.CORBA.iiop.ORB:library:com.sap.
aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClassLoaderAT131b92e6ATalive]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:364)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:421)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:130)
... 11 more
Caused by: java.lang.ClassCastException: class com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incom
patible with class com.ibm.CORBA.iiop.ORB:library:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClass
LoaderAT131b92e6ATalive
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:356)
... 19 more
Caused by:
javax.naming.NamingException: Failed to initialize the ORB [Root exception is java.lang.ClassCastException: class com.sap.eng
ine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incompatible with class com.ibm.CORBA.iiop.ORB:library:com.sap.
aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClassLoaderAT131b92e6ATalive]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:364)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:421)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:123)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:798)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:164)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:179)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.createConnectionFactory(JndiConnectorImpl.java:130)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.doConnect(ConnectorImpl.java:247)
at com.sap.aii.adapter.jms.core.connector.JndiConnectorImpl.doConnect(JndiConnectorImpl.java:185)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connectIfDisconnected(ConnectorImpl.java:170)
at com.sap.aii.adapter.jms.core.connector.ConnectorImpl.connect(ConnectorImpl.java:153)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.doStart(ChannelImpl.java:279)
at com.sap.aii.adapter.jms.core.channel.ChannelImpl.start(ChannelImpl.java:166)
at com.sap.aii.adapter.jms.core.channel.AdapterImpl$1.run(AdapterImpl.java:411)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
Caused by: java.lang.ClassCastException: class com.sap.engine.system.ORBProxy:sun.misc.Launcher$AppClassLoaderAT5d0385c1 incom
patible with class com.ibm.CORBA.iiop.ORB:library:com.sap.aii.adapter.libATcom.sap.engine.boot.loader.ResourceMultiParentClass
LoaderAT131b92e6ATalive
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:92)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:179)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:83)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:59)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:102)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:356)
... 19 more -
Not getting com.ibm.mq.jar and com.ibm.mqjms.jar files
Hi Sudhir,
Thank you very much for your guidance.
But I am not getting com.ibm.mq.jar, and com.ibm.mqjms.jar files. what do I have to do to get this file?
And do I require both these files in getting initial context for JNDI.
Thanks in advance.
Have a nice dayHay,
theres also a zip file from IBM titled MA88 that contain the jar files needed for supporting JMS programs in a Java env (these files are included there) and they're also included in WBI v5.2 and higher. -
I am using Netbeans5.5 with Sun Application Server 9 to develop a sample jms application with EJB. I am just following the sample example found in a website. However, when receiving the message and setting the client ID I always receive the following exception.
com.sun.messaging.jms.JMSException: MQRA:CA:Unsupported-setClientID()
Any help? I have attached my source
initialize ---------------------------------
connection = topicMessageFactory.createConnection();
connection.setClientID("111");
s = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
TopicSubscriber ts = s.createDurableSubscriber(topicMessage,"mySub");
connection.close();
send a message ----------------------------------------------------------
connection = topicMessageFactory.createConnection();
session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer = session.createProducer(topicMessage);
ObjectMessage message = session.createObjectMessage();
message.setObject("Hi there!");
messageProducer.send(message);
messageProducer.close();
connection.close();
Receive the message --------------------------------------------------
connection = topicMessageFactory.createConnection();
connection.setClientID("111");
session = connection.createSession(false,Session.AUTO_ACKNOWLEDGE);
TopicSubscriber ts = session.createDurableSubscriber(topicMessage,"mySub");
connection.start();
Message msg = ts.receive();
connection.close();Did you ever figure out the solution for this error ? I am getting the same error.
Thanks for any help that you can provide.
- vmrao -
Com.ibm.ws.Transaction.IllegalResourceIn2PCTransactionException
Following is the stack trace. Please let me know what could be the issue and what needs to be done to resolve the same
com.ibm.ws.Transaction.IllegalResourceIn2PCTransactionException
at com.ibm.ws.Transaction.JTA.TransactionImpl.enlistResource(TransactionImpl.java:1761)
at com.ibm.ws.Transaction.JTA.TranManagerSet.enlistOnePhase(TranManagerSet.java:525)
at com.ibm.ejs.j2c.LocalTransactionWrapper.enlist(LocalTransactionWrapper.java:517)
at com.ibm.ejs.j2c.ConnectionEventListener.interactionPending(ConnectionEventListener.java:753)
at com.ibm.ws.rsadapter.spi.WSRdbManagedConnectionImpl.processInteractionPendingEvent(WSRdbManagedConnectionImpl.java:1505)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.beginTransactionIfNecessary(WSJdbcConnection.java:385)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1516)
at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.prepareStatement(WSJdbcConnection.java:1487)
at com.opensymphony.user.provider.jdbc.JDBCCredentialsProvider.handles(JDBCCredentialsProvider.java:127)
at com.opensymphony.user.UserManager.getProvider(UserManager.java:312)
at com.opensymphony.user.UserManager.getEntity(UserManager.java:298)
at com.opensymphony.user.UserManager.getUser(UserManager.java:192)
at com.opensymphony.workflow.util.OSUserGroupCondition.passesCondition(OSUserGroupCondition.java:28)
at com.opensymphony.workflow.AbstractWorkflow.passesCondition(AbstractWorkflow.java:768)
at com.opensymphony.workflow.AbstractWorkflow.passesConditions(AbstractWorkflow.java:796)
at com.opensymphony.workflow.AbstractWorkflow.getAvailableActionsForStep(AbstractWorkflow.java:604)
at com.opensymphony.workflow.AbstractWorkflow.getAvailableActions(AbstractWorkflow.java:155)
at equicom.offline.workflow.WorkflowSessionBean.stepToVO(WorkflowSessionBean.java:1125)
at equicom.offline.workflow.WorkflowSessionBean.getCurrentStepAsVO(WorkflowSessionBean.java:1149)
at equicom.offline.workflow.WorkflowSessionBean.createNewWorkItem(WorkflowSessionBean.java:1080)
at equicom.offline.workflow.EJSRemoteStatelessWorkflowSession_d8cfeee0.createNewWorkItem(Unknown Source)
at equicom.offline.workflow._WorkflowSession_Stub.createNewWorkItem(_WorkflowSession_Stub.java:1231)
at equicom.offline.order.ejb.OrderSessionBean.createRequestWorkItem(OrderSessionBean.java:1358)
at equicom.offline.order.ejb.OrderSessionBean.createSubmitRequest(OrderSessionBean.java:342)
at equicom.offline.order.ejb.EJSRemoteStatelessOrderSession_7072af3f.createSubmitRequest(Unknown Source)
at equicom.offline.order.ejb._OrderSession_Stub.createSubmitRequest(_OrderSession_Stub.java:411)
at equicom.web.admin.offline.manualorder.ManualOrderProcessor.saveOrderAndCreateWI(ManualOrderProcessor.java:543)
at equicom.web.admin.offline.manualorder.ManualOrderAction.saveOrderAndCreateWI(ManualOrderAction.java:358)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)I'm not familiar with IBM's implementation, but this kind of error typically happens when more than one non-XA transactional resource is accessed from within a single global transaction. Double-check that the jdbc datasources are configured with XA-capable jdbc drivers. Probably best to consult IBM's support site for further details.
--ken -
Hi,
We are running WebLogic 10.3.0 on RHEL 5.3 with JRockit JDK 1.6 and DB2 Version 8 on mainframe running z/OS 1.9.
We are getting below exception in webLogic logs from connection pool connecting to DB2 database.
>
####<Jul 23, 2010 10:05:49 AM EDT> <Warning> <JDBC> <testing.us.test.net> <testingDB2> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1279893949615> <BEA-001129> <Received exception while creating connection for pool "TestDB2Pool": DB2 SQL Error: SQLCODE=-973, SQLSTATE=00000, SQLERRMC=MON_HEAP_SZ, DRIVER=3.53.70>
####<Jul 23, 2010 10:05:49 AM EDT> <Info> <JDBC> <testing.us.test.net> <testingDB2> <[ACTIVE] ExecuteThread: '2' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1279893949616> <BEA-001156> <Stack trace associated with message 001129 follows:
com.ibm.db2.jcc.b.SqlException: DB2 SQL Error: SQLCODE=-973, SQLSTATE=00000, SQLERRMC=MON_HEAP_SZ, DRIVER=3.53.70
at com.ibm.db2.jcc.b.bd.a(bd.java:679)
at com.ibm.db2.jcc.b.bd.a(bd.java:60)
at com.ibm.db2.jcc.b.bd.a(bd.java:127)
at com.ibm.db2.jcc.b.jb.a(jb.java:4016)
at com.ibm.db2.jcc.t4.bb.l(bb.java:403)
at com.ibm.db2.jcc.t4.bb.d(bb.java:141)
at com.ibm.db2.jcc.t4.b.Oc(b.java:1305)
at com.ibm.db2.jcc.t4.b.b(b.java:1225)
at com.ibm.db2.jcc.t4.b.B(b.java:5129)
at com.ibm.db2.jcc.t4.b.c(b.java:783)
at com.ibm.db2.jcc.t4.b.b(b.java:726)
at com.ibm.db2.jcc.t4.b.a(b.java:409)
at com.ibm.db2.jcc.t4.b.<init>(b.java:345)
at com.ibm.db2.jcc.DB2Driver.connect(DB2Driver.java:197)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.makeConnection(ConnectionEnvFactory.java:316)
at weblogic.jdbc.common.internal.ConnectionEnvFactory.createResource(ConnectionEnvFactory.java:217)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1109)
at weblogic.common.resourcepool.ResourcePoolImpl.makeResources(ResourcePoolImpl.java:1033)
at weblogic.common.resourcepool.ResourcePoolImpl.createResources(ResourcePoolImpl.java:574)
at weblogic.jdbc.wrapper.Connection.run(Connection.java:268)
at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
>
Below is snippet of my datasource configuration.
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/jdbc-data-source" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/jdbc-data-source http://www.bea.com/ns/weblogic/jdbc-data-source/1.0/jdbc-data-source.xsd">
<name>TestingDB2</name>
<jdbc-driver-params>
<url>jdbc:db2://DB2.testing.us.com:50003/TestingDB</url>
<driver-name>com.ibm.db2.jcc.DB2Driver</driver-name>
<properties>
<property>
<name>maxRetriesForClientReroute</name>
<value>2</value>
</property>
<property>
<name>retryIntervalForClientReroute</name>
<value>5</value>
</property>
<property>
<name>user</name>
<value>testuser</value>
</property>
<property>
<name>resultSetHoldability</name>
<value>2</value>
</property>
<property>
<name>enableSysplexWLB</name>
<value>true</value>
</property>
<property>
<name>enableConnectionConcentrator</name>
<value>true</value>
</property>
<property>
<name>databaseName</name>
<value>DB2QA</value>
</property>
<property>
<name>maxTransportObjects</name>
<value>108</value>
</property>
</properties>
<password-encrypted>{3DES}eh4WI16Xb8E=</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>40</initial-capacity>
<max-capacity>215</max-capacity>
<capacity-increment>1</capacity-increment>
<shrink-frequency-seconds>300</shrink-frequency-seconds>
<highest-num-waiters>2147483647</highest-num-waiters>
<connection-creation-retry-frequency-seconds>15</connection-creation-retry-frequency-seconds>
<connection-reserve-timeout-seconds>10</connection-reserve-timeout-seconds>
<test-frequency-seconds>300</test-frequency-seconds>
<test-connections-on-reserve>true</test-connections-on-reserve>
<ignore-in-use-connections-enabled>true</ignore-in-use-connections-enabled>
<inactive-connection-timeout-seconds>300</inactive-connection-timeout-seconds>
<test-table-name>SYSIBM.SYSDUMMY</test-table-name>
<login-delay-seconds>1</login-delay-seconds>
<statement-cache-size>300</statement-cache-size>
<statement-cache-type>LRU</statement-cache-type>
<remove-infected-connections>true</remove-infected-connections>
<seconds-to-trust-an-idle-pool-connection>15</seconds-to-trust-an-idle-pool-connection>
<statement-timeout>-1</statement-timeout>
<pinned-to-thread>false</pinned-to-thread>
</jdbc-connection-pool-params>
<jdbc-data-source-params>
<jndi-name>TestingDB2</jndi-name>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
Please help me on this.
- BoyelTThanks Joe. I will test the standalone client program you provided.
Below are links I found on web on SQL CODE -972 error message
http://www.dbforums.com/db2/875633-sqlcode-973-sqlstate-57011-drda_heap_sz-cobol-db2-error.html
http://publib.boulder.ibm.com/infocenter/tivihelp/v4r1/index.jsp?topic=/com.ibm.tpc_V411.doc/fqz0_r_tbs_db2_sql_973.html
http://www-01.ibm.com/support/docview.wss?uid=swg1IY55389
Below is explanation about this message
===============================================
SQL0973N Not enough storage is available in the "<heap-name>" heap to process the statement.
Explanation: All available memory for this heap has been used. The statement cannot be processed.
User Response: Terminate the application on receipt of this message (SQLCODE). Increase the configuration parameter for "<heap-name>" to increase the heap size.
===============================================
Can you please advise if this is the problem from DBMS side? -
Class not found error for COM.ibm.db2.jdbc.app.DB2Driver
i have written this code:
import java.io.*;
import java.sql.*;
public class tryjdbc
{ public static void main (String args[])
{ try
{ Class.forName("COM.ibm.db2.jdbc.app.DB2Driver"); }
catch (java.lang.ClassNotFoundException e)
{ System.out.print(e.getMessage()); }
and once i try to run it, it gives out a class not found exception error.
I haven't changed anything with the classpath since I don't think the problem is with the classpath. I have read in the IBM Developer Kit for Java documentaton that the AS/400 Developer Kit for Java automatically adds the db2_class.jar file to the classpath. So why do I get a class not found exception error?I was using Web Spehere 4.0.3 and trying to connect to a database on DB2 7.2. I was just following a tutorial and trying to get a handle on Web Sphere. I am running all of these on a Windows 2000 Operating System. Here are some of my observations :
a. db2java.zip packaged under %DB2ROOT%\SQLLIB\JAVA, does not work.
b. CLASSPATH needs to be set to %DB2ROOT%\sqllib\java12\db2java.zip
c. Include this as one of the packages in the package defined in
WebSphere, using the Java Perspective.
d. Ensure that case sensitivity is respected. All though the package
shows up as COM.ibm.db2.jdbc.app.DB2Driver, for some reason, it
will only accept com.ibm.db2.jdbc.app.DB2Driver.
With these settings, I was able to connect to a db2 database.
I am a little puzzled on the following. I did not include java.io package, but still it could print the messages. Did anybody have a similar experience
Thanks for this posting. -
When attempting to create a new Account in siebel integrated with OEDQ the following error occurs.
ERROR
Data Quality vendor-specific error: An error occurred when calling function 'sdq_init_connector ()' in connector ": "(-8) Exception!." Detailed error message: Exception thrown by Java: java.lang.UnsatisfiedLinkError: nio (Not found in com.ibm.oti.vm.bootstrap.library.path)(SBL-APS-00118)
STEPS
The issue can be reproduced at will with the following steps:
1) from EDQ director we have imported the EDQ_CDS,EDQ-REFERENCE DATA & EDQ_HISTORICAl DATA packages sucessfully.
2) Created dnd.param file in SIebel server SDQCOnnector folder.
3) Copied the libdnd.so file to siebsrvr lib directory(32 bit)
3) In dnd.param file we have mentioned the javalib file and instllation directory path(<Siebsrvr roo>/dnd/install)
4) Unzipped the EDQ-Siebel Connector files in dnd/install folder
5) Copied the dnd.properties file in dnd/install directory and modified it accordingly to point to installed EDQ instance.
6) Configured the Siebel components for EDQ integration.
7) Realtime EDQ jobs are running.
8) Create a new Account
Env details are
On : 8.2.2.14 [IP2014] version, Client Functionality
EDQ 11.1.1.7.4
IBM JDK 1.7 32 bit
Using Open UI
Any Champ have faced this issue and overcame it please let me know the resolution steps. your help is
Regards
Monoj Dey
9007554589Hi Monoj,
A few questions:
- What OS is Siebel running on?
- What version of the Siebel connector are you using?
- Which libdnd.so file are you using?
- What's the contents of your dnd.parms file?
thanks,
Nick -
Com.ibm.xml.parser.Parser Not Found
Hi,
I am getting error of Package not found i.e com.ibm.xml.parser.Parser
But i had this package in my libraries and that have been set to project classpath.
Still i m getting error , i m totally confused , please tell me how to resolve it I m using NetBeans.
NitinHi Ben,
I have no solution (sorry), but I've the same trouble.
I would appreciate if you can forward me any given solution.
Thanks in advance,
François Le Rolland
"Benjamin Hyatt" <[email protected]> wrote:
>
Weblogic server 5.1sp6, Weblogic Commerce Server 3.1.
Sun Solaris 5.6, jdk 1.2.2
When starting commerce server(StartCommerce.sh), I get a 'java.lang.ClassNotFoundException: com.ibm.xml.parser.SAXDriver" error message to stdout.
I'm having a hard time understanding why. Weblogicaux.jar is in the weblogic server classpath. Just for sanity sake, in StartCommerce.sh I echoed the $JDK_HOME variable under #-- Start WebLogic with the above parameters --
It is indeed being loaded in the classpath. A quick check via the console confirms this as well.
Any help is appreciated.
Thanks,
-Ben -
NoClassDefFoundError WsnInitialContextFactory com/ibm/ejs/ras/Tr
This is a very well known question.
I try to call datasource from a POJO.
My code is:
Hashtable properties = new Hashtable();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory");
properties.put(Context.PROVIDER_URL, "iiop://localhost:myPortNumber);
Context context = new InitialContext(properties);
DataSource ds = (DataSource) context.lookup("jdbc/myDS");
Line: Context context = new InitialContext(properties); throws Exception as shown below:
Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/ejs/ras/Tr at com.ibm.websphere.naming.WsnInitialContextFactory.<clinit>(WsnInitialContextFactory.java:68).null(Unknown Source)
I have following jar files in build path of the project in following sequence:
idl.jar, iwsorb.jar,j2ee.jar,naming.jar, namingclient.jar,rt.jar, additinal jars in WebSphere v5.1JRE.
Do I need additional jar files?
There is no good documentation on the required jar files.Hello ,my friend.Thank you for your kindness to see my question
This is my log on my websphere console
I want deploy my project from a weblogic to a websphere , Now I try to use Jbuilder and websphere to deploy my code ,but I met a lot of question ,Can you help me? Thank you
Exception in thread "main" java.lang.NoClassDefFoundError: com.ibm.ejs.ras.Tr
at com.ibm.ws.util.ImplFactory.<clinit>(ImplFactory.java:77)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at com.ibm.ws.runtime.WsServer.<clinit>(WsServer.java:51)
at java.lang.J9VMInternals.initializeImpl(Native Method)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:615)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:263) -
Building connection to com.ibm.lang.management MXBeans
Hello, I'm trying to build a jconsole-like application which is able to remote-monitor a jvm.. so far i've get it working for "every" sun-jvm..
now my boss wants me to monitor a ibm j9 jvm.. which doesn't work..
i have this simple test code:
import java.io.IOException;
import java.lang.management.ManagementFactory;
import javax.management.MBeanServerConnection;
import javax.management.remote.JMXConnector;
import javax.management.remote.JMXConnectorFactory;
import javax.management.remote.JMXServiceURL;
import com.ibm.lang.management.MemoryMXBean;
public class IBMConnection {
public static void main(String[] args) throws IOException {
JMXConnector jmxc;
// create jmxserviceurl
JMXServiceURL url = new JMXServiceURL("service:jmx:rmi:///jndi/rmi://"
+ "myhost:1234" + "/jmxrmi");
// connect to jmx service running application with the jmxurl
jmxc = JMXConnectorFactory.connect(url, null);
// create MBeanServerConnection with jmxconnection
MBeanServerConnection mbsc = jmxc.getMBeanServerConnection();
MemoryMXBean ibmOSMXBean;
ibmOSMXBean = ManagementFactory
.newPlatformMXBeanProxy(mbsc, ManagementFactory.MEMORY_MXBEAN_NAME,
MemoryMXBean.class);
System.out.println(ibmOSMXBean.getMaxHeapSize());
}i'm running the application on my local machine, (xp sp3, sun jre-6u16) and trying to connect to "myhost" (AIX 1 6 00CDAB5A4C00 running IBM J9 VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 AIX ppc-32 j9vmap3223-20081129).
it works if i start the application on the aix machine and connect "remote" to itself, but if i am doing it real-remote it throws me this exception:
Exception in thread "main" java.lang.IllegalArgumentException: java.lang:type=Memory is not a platform MXBean
at java.lang.management.ManagementFactory.newPlatformMXBeanProxy(Unknown Source)
at IBMConnection.main(IBMConnection.java:32)so i thought: okay, objectname incorret, and changed ManagementFactory.MEMORY_MXBEAN_NAME to "com.ibm:type=Memory" and "com.ibm.lang:type=Memory", but thatd didn't help neither...
i have found no information on how to connect remote to the ibm mxbeans... i'm pretty desperate atm..
there is no firewall, i used the fully qualified domain name of "myhost", the port is open and accessible (says nmap, and jconsole is able to connect to the app.), the application (which should be monitored) is started with the correct parameters..
i'm running eclipse 3.5 and i have imported the jlm.jar archive from the ibm eclipse-package.. i can see all the methods from the package, but i'm not able to call them remotely through an mbeanproxy... please help meThanks for the images - that clarifies things a bit.
MaxHeapSize is not part of the standard management interface of MemoryMXBean:
[http://java.sun.com/javase/6/docs/api/java/lang/management/MemoryMXBean.html|http://java.sun.com/javase/6/docs/api/java/lang/management/MemoryMXBean.html]
This is probably an OS/Vendor specific extension.
I do not understand why newPlatformMXBean gives you an exception - this is strange - and should
probably be reported as a bug to the implementor of that MBean.
To get the MaxHeapSize, I suggest you use
mbsc.getAtttribute(ObjectName, String /*property name*/) as I suggested earlier.
-- daniel
Edited by: dfuchs on Dec 7, 2009 4:51 PM -
What's wrong with COM.ibm.db2.jdbc.app.DB2Driver?
Hello everybody,
first of all I posted this on
http://www-105.ibm.com/developerworks/java_df.nsf/AllViewTemplate?OpenForm&RestrictToCategory=33
so you can check the IBM forum as well, may be some IBM gurus can comment this...
I'm using the COM.ibm.db2.jdbc.app.Driver shipped with DB2Connect v6.1, v7.1 (tested both on NT and SunOS 5.6, 5.8), the database is DB2 v6, v7 running on an OS390. I am pretty confused:DatabaseMetaData.getProcedureColumns(catalog, schemaPattern, namePattern)cannot handle the namePattern parameter correct. It works only with "", null and "%". Passing any other value results in :COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2] SQL0206N "PROCEDURE " ist in dem verwendeten Kontext ung�ltig. SQLSTATE=42703
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:241)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.throw_SQLException(SQLExceptionGenerator.java:186)
at COM.ibm.db2.jdbc.app.SQLExceptionGenerator.check_return_code(SQLExceptionGenerator.java:419)
at COM.ibm.db2.jdbc.app.DB2DatabaseMetaData.getProcedures(DB2DatabaseMetaData.java:1446)I think that even if the pattern doesn't match any procedure the function should return an empty ResultSet. The only "solution" is to scroll all the procedures in the ResultSet until you find the passing ones. Does IBM think this is serious?
I have dug a bit and found another incompatibitly with the JDBC specification: the names of the result set columns returned by DatabaseMetaData.getProcedureColumns() as returned by the DB2Driver:
PROCEDURE_CAT
PROCEDURE_SCHEM
PROCEDURE_NAME
COLUMN_NAME
COLUMN_TYPE
DATA_TYPE
TYPE_NAME
COLUMN_SIZE
BUFFER_LENGTH
DECIMAL_DIGITS
NUM_PREC_RADIX
NULLABLE
REMARKS
Here comes the JDBC specification:
<quote>
Each procedure description has the the following columns:
PROCEDURE_CAT String => procedure catalog (may be null)
PROCEDURE_SCHEM String => procedure schema (may be null)
PROCEDURE_NAME String => procedure name
COLUMN_NAME String => column/parameter name
COLUMN_TYPE Short => kind of column/parameter:
procedureColumnUnknown - nobody knows
procedureColumnIn - IN parameter
procedureColumnInOut - INOUT parameter
procedureColumnOut - OUT parameter
procedureColumnReturn - procedure return value
procedureColumnResult - result column in ResultSet
DATA_TYPE short => SQL type from java.sql.Types
TYPE_NAME String => SQL type name, for a UDT type the type name is fully qualified
PRECISION int => precision
LENGTH int => length in bytes of data
SCALE short => scale
RADIX short => radix
NULLABLE short => can it contain NULL.
procedureNoNulls - does not allow NULL values
procedureNullable - allows NULL values
procedureNullableUnknown - nullability unknown
REMARKS String => comment describing parameter/column </quote>
I would appreciate your comments.
Regards,
Anton Maleev
IT Consultant, Software Engineer
Frankfurt, Germany
mailto: [email protected]Futhermore, when you call DatabaseMetaData.getProcedures(catalog, schemaPattern, "%") when you specified schemaPattern it returns all the procedures no mather if the schema matches the pattern...
-
frnds!
while calling a method from statelesssession bean the exception is thrown:--
Error 500
An error has occured while processing request:http://192.168.1.61/MyApp/TradeSession/TradeClient.jsp
Message: Server caught unhandled exception from servlet [JSP 1.1 Processor]: RemoteException occurred in server thread; nested exception is: com.ibm.ejs.container.UncheckedException: ; nested exception is: java.lang.NullPointerException
Target Servlet: JSP 1.1 Processor
StackTrace:
Root Error-1: RemoteException occurred in server thread; nested exception is: com.ibm.ejs.container.UncheckedException: ; nested exception is: java.lang.NullPointerException---------------------------------
can anybody tell the cause and the way out!!
pawPaw,
Did you already find a solution for this ?
I am facing exactly the same problem ...
Gert C. -
In my servlet's init method I'm loading a configuration file. If the configuration file cannot be found (or is fubared), I throw an UnavailableException with a description of the problem and how to resolve it.
The result of throwing this exception out of init gives in stdout:
6ab39d49 TraceNLS u No message text associated with key Servlet.is.unavailable,.because.the.root.configuration.could.not.be.loaded.
To.fix,.insert.root.properties.into.the.classpath. in bundle com.ibm.ejs.resources.seriousMessages
This is ugly and I'd like to remove this warning. I can convert my message text to a key, but how/where can I map my key to some text so that I won't get this warning from TraceNLS?
Googling TraceNLS and com.ibm.ejs.resources.seriousMessages just brought up a bunch of pages of people with problems who copy/pasted their entire output.
Thanks for your help.This error is caused by $(node.name) variables in the application server descriptors of the nodes not being replaced with the node name.
Simply open the server.xml file for each node and replace $(node.name) with the specific node name of each node. This can also be done at the dmgr level for each application server so that it syncs in the future.
See this topic for a similar error involving security.xml:
http://www-1.ibm.com/support/docview.wss?uid=swg21221268 -
Class com.ibm.jsse.be configured for a TrustManagerFactory : Help needed
Hi
I am getting the following runtime error when trying for a HTTPS connection from my java code.
Runtime Error : Class com.ibm.jsse.be configured for a TrustManagerFactory: not a TrustManagerFactory Action: 4 Class: com.americanexpress.teen.common.fis.FISInterface Method: getFISTestData(String fisURL) Exception:java.net.SocketException: Class com.ibm.jsse.be configured for a TrustManagerFactory: not a TrustManagerFactory
at javax.net.ssl.DefaultSSLSocketFactory.createSocket(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.b.b(Unknown Source)
at com.ibm.net.ssl.www.protocol.http.bs.a(Unknown Source)
at com.ibm.net.ssl.www.protocol.http.bs.o(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.b.<init>(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.b.a(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.b.a(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.b.a(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.p.b(Unknown Source)
at com.ibm.net.ssl.www.protocol.https.p.connect(Unknown Source)
at com.ibm.net.ssl.www.protocol.http.bw.getInputStream(Unknown Source)
at com.ibm.net.ssl.www.protocol.http.bw.getHeaderField(Unknown Source)
at com.ibm.net.ssl.www.protocol.http.bw.getResponseCode(Unknown Source)
at com.ibm.net.ssl.internal.www.protocol.https.HttpsURLConnection.getResponseCode(Unknown Source)
at com.americanexpress.teen.common.fis.FISInterface.getFISTestData(FISInterface.java:2238)
at org.apache.jsp._fisTestPage._jspService(_fisTestPage.java:112)
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:344)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.serviceJspFile(JspServlet.java:669)
at com.ibm.ws.webcontainer.jsp.servlet.JspServlet.service(JspServlet.java:767)
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.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:61)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:974)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:564)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:200)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:276)
at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
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:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
My application is trying to a https://xyz.com from java code and i am getting the above exception.
I tried connecting to "https://xyz.com " from my workspace via Websphere 5.1 server and my server is throwing the above exception. I have extened the ibmjsse provided by WAS 5.1 and using it for connecting to the HTTPS URL.
I feel the above problem might be due to network issues. Please help me in resolving the same.
Thanks in advance !!!!!Steps i have done to ensure the connectivity :
Method A :
1) I imported the pfx and CA certificates given by xyz.com in my web browser (IE)
2) After that, I tried connecting to "https://xyz.com" from browser and getting a proper response.
Method B :
1) I updated the jre cacert with CA certificate given by xyz.com
2) Loaded the pfx keystore from my java client code program and ran it as a java standalone code and got the proper response.
My java code
import java.io.*;
import java.net.*;
import javax.net.ssl.HttpsURLConnection;
import javax.net.ssl.*;
import java.security.*;
import java.sql.Time;
public class HTTPSConnect{
public static void main(String[] args)
URL url;
StringBuffer buffer;
String line;
int responseCode=0;
HttpsURLConnection connection = null;
InputStream input;
BufferedReader dataInput;
//FIS Sample URL
String fisURL = "https://xyz.com";
String fisResp = "";
try
Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
System.setProperty("javax.net.debug", "all");
String path = "F:\\MyCertificate.pfx";
String type = "pkcs12";
String password = "abc123";
System.setProperty("javax.net.ssl.keyStoreType", type);
System.setProperty("javax.net.ssl.keyStore",path);
System.setProperty("javax.net.ssl.keyStorePassword",password);
url = new URL(fisURL);
//Create the connection
connection = (HttpsURLConnection) url.openConnection();
connection.setUseCaches(false);
//Get the response code for the HTTPS connection
responseCode = connection.getResponseCode();
if (200 == responseCode)
buffer = new StringBuffer();
//Getting the FIS Response XML using the Stream reader
input = connection.getInputStream();
dataInput = new BufferedReader(new InputStreamReader(input));
while ((line = dataInput.readLine()) != null)
buffer.append(line);
buffer.append('\n');
fisResp = (String) buffer.toString().trim();
else
System.out.println("HTTP Status-Code : " + responseCode);
catch (MalformedURLException mue)
System.out.println("Exception in URL : " + mue.getMessage() );
mue.printStackTrace();
catch (IOException ioe)
System.out.println("IO Exception : " + ioe.getMessage() );
ioe.printStackTrace();
catch (Exception e)
System.out.println("Exception : " + e.getMessage() );
e.printStackTrace();
System.out.println("FIX XML Response : " + fisResp);
System.out.println("Response Code of HTTPS Connection : " + responseCode);
Please let me know if i am missing something :)
Maybe you are looking for
-
Vendor Line item with Opening and Closing Balances report regarding
Dear All, I need a report for vendor line items with Opening and Closing balances. Thanks in advance Sateesh
-
Get Rid of 'Would You Like to make iCal Your default calendar application'
Since installing the Plaxo 'helper' / Pref Pane - I now get the following message every time I launch iCal (and Address Book) ... 'Would you like to make iCal your default calendar application?' Even when selecting 'Make Default' it still asks the ne
-
FM for MM Contracts (outline agreements)
Hi everybody ! I need your precious help... I have to change regulary the price conditions (PB00) for some items in contracts, and I wanted to know if there was a function module or a bapi that could do that, and, is there an FM or a BAPI that could
-
Speed of processor is being limited by system firmware after BIOS update
Hello, I have updated the BIOS of my G510 to the latest version, which is 3.09. But after this update, I have noticed "The speed of processor is being limited by system firmware" entries at the Windows System event log. They are like that: "The speed
-
Endpoint for FTP based proxy in Linux-urgent
Hi, I have configured FTP based proxy. Both FTP server and ALSB are running on same machine. I have configured endpoint as ftp://<ip>:21/. FTP directory is /home/alsb I have also mentioned error,archive and download dirs in /home/Dir/download ,/home/