XMLDocument and ClassCastException
We recently upgraded to Java 1.4.1_02 from Java 1.3.0.
The following type casting worked in java 1.3.0, but throws java.lang.ClassCastException while running in Java 1.4.1.
XmlDocument xdoc = (XmlDocument)doc;
where 'doc' is a variable of interface org.w3c.dom.Document
Do anybody have an idea why it does not work in Java 1.4.1?
Does the parser.jar file (that has the classfiles XMLDocument and Document) need to be upgraded for Java 1.4.1?
The problem was because Java 1.4.1 comes with its apache's implementation of XMLDocument and this was interfering with the XMLDocument class in parser.jar, which was sun's implementation.
So, when we removed parser.jar from classpath, it is working fine.
Similar Messages
-
NegativeArraySizeException and ClassCastException
Guys,could someone give me a scenario where NegativeArraySizeException and ClassCastException are thrown???
int myArraySize = -1;
int[] myArray = new int[myArraySize];
Object someObject = "foo";
Integer anInteger = (Integer) someObject; -
Creating XMLDocuments and setting their DTD
Hello,
i am exporting java objects to XML. I can construct a DOM with a XMLDocument and using its print method export it.
What i was unable to do so far was setting the DTD of these documents.
If i construct a parser, parse the DTD and then get the DTD via
Document doc = parser.getDocument() and
DocType dtd = doc.getDocumentType() how
do i set the DTD of the freshly constructed XMLDocuments to use this one in order to be able to check the correctness of the documents using this DTD at a later time?
Thanks.
Regards,
DirkYour method of getting the DTD object is correct. However, we do not do any validation while creating the DOM tree
using the DOM APIs. So setting the DTD in the Document will not help in validating the DOM tree that is constructed.
The only way to validate an XML file is to parse the XML document using DOMParser or SAXParser.
Oracle XML Team
null -
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 -
NamingException and ClassCastException during jndi lookup
Hi,
I am trying to access the SAP database(MaxDb)using JNDI lookup in WebDynpro simple java project.
But, during lookup I am getting the following error
com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name : jdbc/VSLOOKUP , can not resolve object reference [Root exception is java.lang.ClassCastException]
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:469)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:558)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.vitalspring.healthbenefits.dbaccess.DBAccessHelper.main(DBAccessHelper.java:51)
Caused by: java.lang.ClassCastException
at com.sap.engine.services.connector.ResourceObjectFactory.getObjectInstance(ResourceObjectFactory.java:149)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:466)
... 3 more
Can anybody throw some light on it?
Because, it's urgent for my project.
I would appreciate any kind of help in this regard.
Thanks & Regards,
Rambabu KancharlaHello Anilkumar,
Sorry for delay in reply as I was on out of work and didn't get chance to check the SDN forums.
I was able to do it in latest version sneak preview 11.
I think the problem with the version.
Thanks,
Rambabu -
XMLDocument and xsl ??!! How to do that ??
Hi all,
i've an XMLDocument (java object) and a xsl file (on disk). I would like to generate HTML from that (from a servlet actually)...is it possible ?? Can u show me a piece of code ?
Thanks a lot!!
Javamad.import java.io.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class Example extends HttpServlet
public void doPost(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
res.setContentType("text/html");
PrintWriter out=res.getWriter();
Runtime r = Runtime.getRuntime();
Process p=null;
try
p=r.exec("c:\\test.bat");
catch(Exception e)
out.println("Error from execution" + e.toString());
test.bat file:-
(java -classpath c:\lotusxsl-j_2_0_1\bin\xerces.jar;c:\lotusxsl-j_2_0_1\bin\lotusxsl.jar;c:\lotusxsl-j_2_0_1\bin\xalan.jar;c:\lotusxsl-j_2_0_1\bin\xalanservlet.jar; com.lotus.xsl.Process -in file1.xml -xsl file2.xsl -out file3.html)
With Regards -
Servlets and Workspaces (AND ClassCastExceptions)
I have a similiar situation but am not getting a ClassCastException but rather a
NullPointerException when I try
to use a contained object in my stored object.
I do this in the server:
WorkspaceServicesDef workspaceServices = services.workspace();
WorkspaceDef defaultWS = workspaceServices.getWorkspace();
WorkspaceDef dataWS = defaultWS.getWorkspace("DATA_WORKSPACE",
WorkspaceDef.CREATE,
WorkspaceDef.SCOPE_SERVER);
dataWS.store(cMSKey, ms);
and this in the JSP page:
// Get the default T3Client Workspace
WorkspaceDef defaultWS = t3.services.workspace().getWorkspace();
// Attach to the system subWorkspace already created
WorkspaceDef myDataWS = defaultWS.getWorkspace("DATA_WORKSPACE",
WorkspaceDef.ATTACH,
WorkspaceDef.SCOPE_SERVER);
MimicServer ms = (MimicServer) myDataWS.fetch("MimicServer");
Questions:
1)Must I make the Object I want to store in the WorkSpace Serializable?? The
Documentation says it can just be
a Java Object??
2) In my JSP page I get a good Object reference, but its contents are null
(Probably because I didn't implement write() and read()).
Thanks,
matt obrien
[email protected]
Mark Griffith wrote:
> Alexandre:
>
> Although byte for byte the FooObject is the same, according to the VM they
> are different class. This is because a class's type distinctiveness is
> based not only its interfaces,methods,data members etc but ALSO on its
> classloader. There is a different classloader for the
> serversclasses_FooObject and the servletclasses_FooObject so they are
> considered different, so you get a CCE.
>
> Problem is that the servletclasses directory is designed to solve the
> problem of reloading servlet classes and objects they used when modified
> without having to restart the server. But this introduces the problem
> discussed above. The only solution currently is to put the FooObject only in
> one place or another. Unfortunately if you want a class in servletclasses
> to interact classes loaded by the system/server classloader you cannot put
> the class in the servletclasses without getting a CCE on reload of the
> servlet in servletclasses. In this case you must put the class only in the
> serverclasses directory. And this means of course you can only reload the
> FooObject in the serverclasses directory if you bounce the server. (the
> default java classloading behavior).
>
> This will be handled more elegantly in our next major release Spring 2000,
> however note (and prepare by designing accordingly) the solution is to allow
> the Servlet to interact with interfaces not actual classes and these
> interfaces can be stuffed into system/server loaded classes such as
> workspaces and httpsessions, thus preventing CCE's.
>
> Cheers
> Mark G
>
> Alexandre Aubry wrote:
>
> > I have a named workspace which is created at startup of the server
> > within a starup class.
> > When the startup method is called, I instantiate and put an object
> > called FooObject in the workspace.
> >
> > Then, in a servlet, called Dispatcher, in the service method, I
> > retrieved my named workspace and the object
> > FooObject which is in this workspace. At this time, I have a
> > ClassCastException.
> >
> > To give you more details about my configuration, here is my directory
> > configuration:
> > weblogic
> > |----------- serverclasses
> > |------------- startupObject
> > |------------- FooObject
> > |----------- servletclasses
> > |------------- myServlet
> > |------------- FooObject (which is exactly
> > the same of the serverclasses one)
> >
> > Do you have any ideas ? The idea is to instantiate a given object at the
> > startup of the web server and to retrieve
> > these objects within servlets and JSPs.
> >
> > Regards.
> >
> > --
> > Alexandre Aubry
> > Consultant
> > Fi System, The Web Agency
> > http://www.fisystem.fr
> > mailto:[email protected]
> > Phone: +33 1 55 04 03 03 Fax: +33 1 55 04 03 04
>
> --
> =====================================================
> Reply to the newsgroup. Don't reply to this mail
> alias. This is used only for answering posts on
> WebLogic Newsgroups.
> =====================================================
-
Serialization and ClassCastException
hi all,
I have a a class like this:
import java.io.Serializable;
import java.util.ArrayList;
public class Fact implements Serializable {
private String name;
private ArrayList al=new ArrayList();
public Fact(String _name) {
name=_name;
al.add("Pippo");
al.add("Pluto");
al.add("Papero");
public String getName() {
return name;
public ArrayList getList() {
return al;
and I want to serialize objects of it in a mySQL database table. the table has two field: 'name', a varchar(20) used as a key and 'object', a blob field to store Java objects.
this is my code to put object in the table (it seems to work fine):
public boolean putFact(Fact fact) { // inserts a new fact in the db
Fact result=null;
try {
PreparedStatement pstmt=conn.prepareStatement("INSERT INTO facts VALUES (?, ?)");
pstmt.setString(1, fact.getName());
pstmt.setObject(2, fact);
pstmt.executeUpdate();
pstmt.close();
} catch (SQLException ex) {
System.out.println(ex.toString());
return false;
return true;
this code musts get an object from the table:
public Fact getFact(String factName) {
Fact result=null;
try {
Statement stmt=conn.createStatement();
ResultSet rs=stmt.executeQuery("SELECT object FROM facts WHERE name='"+factName+"'");
while (rs.next()) {
result=(Fact)rs.getObject(1);
rs.close();
stmt.close();
} catch (SQLException ex) {
System.out.println(ex.toString());
return null;
return result;
on the 7th line of the getFact method I have a ClassCastException: why?
in addition, if I remove the ArrayList element from the Fact class, my code works fine.
any help?
thanks a lot. :)first of all, thanks for your support, sylviae. :)
well, I used your syntax
(System.err.println(anObject.getClass());) and the
result is "class Fact": so, the serialization process
seems to be right.
then, I tried to change the field from BLOB to
MEDIUMBLOB type, and now it works! so, I suppose that
the BLOB type was not able to manage a Fact object.That doesn't really make much sense. If in the revised code you were getting the exception on the line that casts anObject to be a Fact object, then I'd start to wonder about ClassLoader issues. Still, given that you've got it working, you're probably not concerrned about the exact cause.
>
in the end, can you suggest me a way to generate SQL
statements, if mine has the error you said?Use the prepareStatement mechanism as you did for the insert statement, and associate the value with the "?" parameter. I know this looks more clumsy, and is certainly more code, but it is much safer. It's also capable of a more effecient execution because the underlying implementation can note that it's already parsed the statement and avoid having to do it again.
Sylvia. -
I'm trying to exchange messages between two applications running on Oracle 9iAS (9.0.3) and I'm getting a ClassCastException.
Basically, I'm sending Command instances over the wire, which are to be executed on the other end. The concrete Command class is in a jar, which is in both web applications' WEB-INF/lib. I checked that both apps contain the same version of the jar. I have a simple JSP in both apps to publish a message containing a command. For testing purposes, both apps run in the same JVM (OC4J).
Both apps have a TopicSubscriber instance connected to the same Topic. When I publish an instance of ObjectMessage with the Command instance as the payload, both apps receive the message, but upon getting the payload (message.getObject()) the app that did not send the message fails with a ClassCastException.
Here's an example:
App A publishes an ObjectMessage with an instance of com.foo.FooCommand on the Topic
App A receives the message and successfully gets the FooCommand from the received message
App B receives the message and fails with a ClassCastException when getting the FooCommand from the message.
The ClassCastException looks like this:
java.lang.ClassCastException: com.foo.FooCommand
Publisher:
Message m = topicSession.createObjectMessage(new FooCommand());
Subscriber:
ObjectMessage om = (ObjectMessage) message;
Command c = (Command) om.getObject();
The second line in the subscriber code fails. Command is the interface that has to be implemented by all commands, it extends Serializable.
I already tried adding a serialVersionUID to the command class, but it didn't help. Is there any other way into making the ClassLoader believe that both instances are the same?
Any ideas?
TIA,
NilsNils, the ClassCastException is expected if you put your class in both applications' WEB-INF/lib. The class is loaded by App A's web module classloader and, separately, loaded by App B's web module classloader. You have two instances of Class that have the same underlying bits of class format but loaded by two different classloaders, which is the classic situation that leads to ClassCastException.
The guideline of the solution: let a common parent classloader of those two classloaders load the class. What you need to do is to make your jar visible to all applications or loaded by a parent application of your App A and App B. The way to do it is mentioned in my message
Re: Quick question on parent-child relationship in OC4J 10.1.3
The simplest of all is to put your jar in
<ORACLE_HOME>/j2ee/home/applib.
Hope this help you. -
ServerAffinity and Stateless EJB and ClassCastException
Hello,
We are using Weblogic Server 8.1 SP4.
I have an EJB set the bean-load-algorithm to weight-based-affinity because we have a client cluster communicating with a server cluster and would like to maintain affinity with a single node of the server cluster.
We are getting the following exception when making a call from the client to the server:
Caused by: java.lang.ClassCastException
at weblogic.rmi.cluster.WeightBasedReplicaHandler.chooseReplica(WeightBa
sedReplicaHandler.java:53)
at weblogic.rmi.cluster.BasicReplicaHandler.chooseReplicaUsingAffinity(B
asicReplicaHandler.java:567)
at weblogic.rmi.cluster.BasicReplicaHandler.loadBalance(BasicReplicaHand
ler.java:283)
at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteR
ef.java:241)
at org.collegeboard.ecommerce.content.ejb.AdService_5ucrg0_EOImpl_814_WL
Stub.retrieveAd(Unknown Source)
... 25 more
When I switch the server EJB back to the default of round robin, it works fine.
The default cluster algo for both clusters are the default (at the server level).
Any ideas?
Thanks in advance.
--baharI think you should contact [email protected] This looks like a bug to me.
-- Rob
WLS Blog http://dev2dev.bea.com/blog/rwoollen/ -
TreeSet and ClassCastException
Hi,
I know that I shouldn't add abjects to TreeSet which can't be compared (it's called
mutually comparable, isn't it ?) - so basically thay all have to be the same type.
But could anybody explain me why if I break this tule I get this error:
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer
at java.lang.String.compareTo(String.java:90)
at java.util.TreeMap.compare(TreeMap.java:1093)
at java.util.TreeMap.put(TreeMap.java:465)
at java.util.TreeSet.add(TreeSet.java:210)
at com.adrian.Book.main(Book.java:26)
What interests me here is what a TreeMap is doing here ?
And how am I supposed to read this information (step by step) ?
I don't understand this output ...
Here is the code:
public class Book {
public static void main(String[] args) {
Set s=new TreeSet();
s.add(new Integer(1));
s.add("a");
s.add(new Integer(5));
s.add(new Integer(3));
for(Object o:s)
System.out.print(o+" ");
}Thanks,
AdrianOk - I found that TreeSet uses TreeMap in its
implementation - that's why it appears
there.That is correct.
TreeSet makes a call to TreeMap's put(...) method on line 210 from the add(...) method.
Exception in thread "main" java.lang.ClassCastException: java.lang.Integer
at java.lang.String.compareTo(String.java:90)
at java.util.TreeMap.compare(TreeMap.java:1093)
at java.util.TreeMap.put(TreeMap.java:465)
at java.util.TreeSet.add(TreeSet.java:210)
at com.adrian.Book.main(Book.java:26)
If you're curious what is happening exactly, you can always (download and) take a look at the source code:
http://download.java.net/jdk6/ -
Generics and ClassCastException
Does anyone know why in the following code map.get("one").getClass() is the only line which throws ClassCastException.
Map<Integer, Integer> map = new HashMap<Integer, Integer>();
map.put(1, 1);
System.out.println("map.get(1) =" + map.get(1));
Object obj = map;
Map<String, Number> map2 = (Map<String, Number>) obj;
map2.put("one", 1L);
System.out.println("map2.get(1) =" + map2.get(1));
System.out.println("map2.get(one) =" + map2.get("one"));
Map<String, Integer> map3 = (Map<String, Integer>) obj;
System.out.println("map3.get(1) =" + map3.get(1));
// Doesn't throw ClassCastException even though the return value is a Long, not Integer.
Object objOne = map3.get("one");
System.out.println("map3.get(one) =" + map3.get("one") + ", " + objOne.getClass());
try {
// throws ClassCastException ????.
System.out.println("map3.get(one).getClass() =" + map3.get("one").getClass());
} catch (ClassCastException e) {
System.out.println("map3.get(one).getClass() throws " + e);
}I have JDK 1.5.0_02Map<String, Integer> map3 = (Map<String,<String, Integer>) obj;
System.out.println("map3.get(1) =" +
(1) =" + map3.get(1));
// Doesn't throw ClassCastException even
ion even though the return value is a Long, not
Integer.
Object objOne = map3.get("one");
System.out.println("map3.get(one) =" +
ne) =" + map3.get("one") + ", " +
objOne.getClass());
try {
// throws ClassCastException ????.
System.out.println("map3.get(one).getClass()
etClass() =" + map3.get("one").getClass());
} catch (ClassCastException e) {
System.out.println("map3.get(one).getClass()
etClass() throws " + e);
I have JDK 1.5.0_02
Okay, now that I have my X-Ray Specs on, I see the longs. At first, I was surprised
by the class cast, but what I think is happening is that the expression:
map3.get("one")Has an implicit cast in it, thanks to generics:
((Integer)map3.get("one"))And it's that cast that's generating the runtime exception. Now, how do folks
dump out class files in readable format? I'd like to see to myself... -
References and ClassCastException
Hello,
Iu2019m getting the exception: java.lang.ClassCastException
If I have this:
List<Turno> turnos = (List<Turno>)this.servicioCrud.findAll(Turno.class);
String resp ="**--**"+turnos+"-----"+turnos.size();
return resp;
It works and I have the next message:
class $Proxy18271 **--**[co.com.crystal.eficiencias.entidad.Turno @ c58068, co.com.crystal.eficiencias.entidad.Turno @ 713fba, co.com.crystal.eficiencias.entidad.Turno @ 10f0602, co.com.crystal.eficiencias.entidad.Turno @ 1537b2e]-----4
but if I try to print every item of the list, like this:
List<Turno> turnos = (List<Turno>)this.servicioCrud.findAll(Turno.class);
String resp ="**--**"+turnos+"-----"+turnos.size();
for (int i = 0; i < turnos.size(); i++) {
resp = resp+" "+turnos.get(i).getDeTurno()+"\n";
return resp;
I get the exception:
Caused by: java.lang.ClassCastException: class co.com.crystal.eficiencias.entidad.Turno:crystal.com.co/servicio_crud_ear @[email protected]@alive incompatible with class co.com.crystal.eficiencias.entidad.Turno:crystal.com.co/captura_produccion_ear @com.sap.engine.boot.loader.ResourceMultiParentClassLoader@1c589f@alive
at co.com.crystal.eficiencia.primera.CapturaPrimeraEjbBean.test(CapturaPrimeraEjbBean.java:409)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
I think the problem could be because de class Turno (which is in entidades.jar) are referenced in the two .ear files (servicio_crud.ear and captura_produccion_ear) through the tab u201CDependenciesu201D in the u201CComponent propertiesu201D.
I donu2019t know how I could reference the file entidades.jar without this problem.
Regards
JanethHi Janeth,
It seems that entidades.jar (containing the class Turno) is being assembled in both of your apps (servicio_crud.ear and captura_produccion.ear) and that leads to the error.
You could try to only assemble it in servicio_crud.ear, and define a compile dependency on it in the respective module of captura_produccion.ear as well as a runtime dependency from captura_produccion.ear to servicio_crud.ear.
Or you could create a separate EAR DC to wrap entidades.jar and refer to it from both servicio_crud.ear and captura_produccion.ear (without assembling it into them).
HTH!
\-- Vladimir -
WARs and ClassCastException redux...
so i've been poring through messages in this newsgroup.. and i've
noticed that many people have run into the ClassCastException problem
with WARs that have servlets forwarding on to jsps using objects
stuffed away in sessions..
i've been trying to get my web application working as a WAR, but i've
run into this very problem. (jsps try to retrieve object from session
that was stored away by controlling servlet, but get a
ClassCastException) is it true that, because weblogic uses different
classloaders for servlets and jsps in a WAR, WARs are essentially
worthless for my app? is there a solution to this? is bea addressing
this too?
thx
leo
i read your solution on previous posts, and it works.. but is this the
only solution? it seems odd that the classloading behavior would
differ depending on whether you executed a JSP or servlet first. do
you mean that i have to invoke JSPs controlled by all my servlets
first? or just one of them, and the rest will behave accordingly?
thx
leo
On Thu, 21 Dec 2000, Cameron Purdy wrote:
> After starting the server, invoke a JSP before invoking the first servlet.
>
> Peace,
>
> --
> Cameron Purdy
> Tangosol, Inc.
> http://www.tangosol.com
> +1.617.623.5782
> WebLogic Consulting Available
>
>
> "Leo Kim" <[email protected]> wrote in message
> news:Pine.OSX.4.30.0012191647220.1267-100000@ginormous...
> > so i've been poring through messages in this newsgroup.. and i've
> > noticed that many people have run into the ClassCastException problem
> > with WARs that have servlets forwarding on to jsps using objects
> > stuffed away in sessions..
> >
> > i've been trying to get my web application working as a WAR, but i've
> > run into this very problem. (jsps try to retrieve object from session
> > that was stored away by controlling servlet, but get a
> > ClassCastException) is it true that, because weblogic uses different
> > classloaders for servlets and jsps in a WAR, WARs are essentially
> > worthless for my app? is there a solution to this? is bea addressing
> > this too?
> >
> > thx
> > leo
> >
>
>
>
-
Startdrag() and ClassCastException !
hello everybody !
when i execute this code :
public class CTree extends JTree implements DragSourceListener,
DragGestureListener,
Autoscroll {
private BufferedImage _imgGhost;
public void dragGestureRecognized(DragGestureEvent e) {
Transferable transferable = new ... ;
e.startDrag(null, _imgGhost, new Point(5,5), transferable, this);
a message "ClassCastException" appears and the problem is linked to the startDrag() method.
why ?
it's important or not ?
can you help me ?
thanks for all.
FMP.this the stack :
"java.lang.ClassCastException
at sun.awt.datatransfer.DataTransferer.translateTransferable(DataTransferer.java:1197)
at apple.awt.CDataTransferer.translateTransferable(CDataTransferer.java:129)
at sun.awt.datatransfer.DataTransferer$6.run(DataTransferer.java:1937)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:448)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:230)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:183)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
FMP.
Maybe you are looking for
-
How do I sync iphone contacts with icloud AND gmail on PC without Outlook
I own an iphone and ipad and use a PC. I will eventually change the PC to a Mac but until then I would like to know that any new or edited contacts (on my iphone) are being backed up somwhere. I am using the icloud but my PC tells me I need Outloo
-
Audio with video import???
I am using photoshop cc. when I bring in a video the audio doesn't come in with it. If I start with Bridge the audio plays fine in Bridge. Have tried several video files all with the same problem.
-
Mapping points on distance?
Does anyone know of java program that can take a matrix of distances between some places and map these places by plotting them? For example, if I have the matrix A B C D A 0 12 3 6 B 12 0 4 7 C 3
-
Goods Receipt before the delivery date
Hi I have requirement that Goods Receipt should not happen before the specifed delivery date mentioned in the Purcahse Order. Is there any customization for the same? Regards
-
How to move materials from one sloc to another sloc materials are more tha
Hi, Can any one help me on this issue How to move materials from one sloc to another sloc materials are more than 1000 and from existing sloc to new sloc which is Hum managened i need help onthis issue thanks