ClassCastException in generated code
Hi, I am getting a rather nasty ClassCastException when i try and remove a many-to-many join (implemented like the MovieDatabase example). My question is how do i go about debugging this? Is it possible to get access to the generated .java files? Thanks in advance for any advice stack traces follow (sorry) cheers timj com.evermind.server.rmi.OrionRemoteException: java.lang.ClassCastException: ProductJoin_EntityBeanWrapper853 at com.evermind.server.ejb.EJBUtils.getUserException(.:199) at EntityProduct_EntityBeanWrapper838.removeBrand(EntityProduct_EntityBeanWrapp er838.java:1805) at com.mywds.ejb.session.LightWeightBean.updateProduct(Unknown Source) at LightWeight_StatelessSessionBeanWrapper834.updateProduct(LightWeight_Statele ssSessionBeanWrapper834.java:4066) 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:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(Unknown Source) at org.apache.axis.providers.java.RPCProvider.processMessage(Unknown Source) at org.apache.axis.providers.java.JavaProvider.invoke(Unknown Source) at org.apache.axis.strategies.InvocationStrategy.visit(Unknown Source) at org.apache.axis.SimpleChain.doVisiting(Unknown Source) at org.apache.axis.SimpleChain.invoke(Unknown Source) at org.apache.axis.server.AxisServer.invoke(Unknown Source) at org.apache.axis.transport.http.AxisServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._bxb._crd(.:501) at com.evermind._bxb._ukb(.:170) at com.evermind._cn._uab(.:576) at com.evermind._cn._fm(.:189) at com.evermind._bs.run(.:62) Nested exception is: java.lang.ClassCastException: ProductJoin_EntityBeanWrapper853 at ProductJoinHome_EntityHomeWrapper1381.remove(ProductJoinHome_EntityHomeWrapp er1381.java:16) at com.mywds.ejb.entity.EntityProductBean.removeBrand(Unknown Source) at EntityProduct_EntityBeanWrapper838.removeBrand(EntityProduct_EntityBeanWrapp er838.java:1791) at com.mywds.ejb.session.LightWeightBean.updateProduct(Unknown Source) at LightWeight_StatelessSessionBeanWrapper834.updateProduct(LightWeight_Statele ssSessionBeanWrapper834.java:4066) 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:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(Unknown Source) at org.apache.axis.providers.java.RPCProvider.processMessage(Unknown Source) at org.apache.axis.providers.java.JavaProvider.invoke(Unknown Source) at org.apache.axis.strategies.InvocationStrategy.visit(Unknown Source) at org.apache.axis.SimpleChain.doVisiting(Unknown Source) at org.apache.axis.SimpleChain.invoke(Unknown Source) at org.apache.axis.server.AxisServer.invoke(Unknown Source) at org.apache.axis.transport.http.AxisServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._bxb._crd(.:501) at com.evermind._bxb._ukb(.:170) at com.evermind._cn._uab(.:576) at com.evermind._cn._fm(.:189) at com.evermind._bs.run(.:62)
RE: ClassCastException in generated code
Did you change your bean recently? It sounds like your remotes are out of date. Ensure you remotes on the client side match up properly. Also ensure any Serialiazable classes you pass via method calls are not updated in only the client of server. This error normally happens when you either try to cast the wrong object (I.e. in Collections this can happen easily if you are not careful) and serialized objects (when the new class doesn't match up to the old one). These will compile fine, but break during runtime. Without any other information, this is all I can add. Hope this helps. Greg -Original Message- From: Tim Joyce [mailto:[EMAIL PROTECTED]] Sent: Wednesday, May 15, 2002 4:16 AM To: Orion-Interest Subject: ClassCastException in generated code Hi, I am getting a rather nasty ClassCastException when i try and remove a many-to-many join (implemented like the MovieDatabase example). My question is how do i go about debugging this? Is it possible to get access to the generated .java files? Thanks in advance for any advice stack traces follow (sorry) cheers timj com.evermind.server.rmi.OrionRemoteException: java.lang.ClassCastException: ProductJoin_EntityBeanWrapper853 at com.evermind.server.ejb.EJBUtils.getUserException(.:199) at EntityProduct_EntityBeanWrapper838.removeBrand(EntityProduct_EntityBeanWrapp er838.java:1805) at com.mywds.ejb.session.LightWeightBean.updateProduct(Unknown Source) at LightWeight_StatelessSessionBeanWrapper834.updateProduct(LightWeight_Statele ssSessionBeanWrapper834.java:4066) 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:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(Unknown Source) at org.apache.axis.providers.java.RPCProvider.processMessage(Unknown Source) at org.apache.axis.providers.java.JavaProvider.invoke(Unknown Source) at org.apache.axis.strategies.InvocationStrategy.visit(Unknown Source) at org.apache.axis.SimpleChain.doVisiting(Unknown Source) at org.apache.axis.SimpleChain.invoke(Unknown Source) at org.apache.axis.server.AxisServer.invoke(Unknown Source) at org.apache.axis.transport.http.AxisServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._bxb._crd(.:501) at com.evermind._bxb._ukb(.:170) at com.evermind._cn._uab(.:576) at com.evermind._cn._fm(.:189) at com.evermind._bs.run(.:62) Nested exception is: java.lang.ClassCastException: ProductJoin_EntityBeanWrapper853 at ProductJoinHome_EntityHomeWrapper1381.remove(ProductJoinHome_EntityHomeWrapp er1381.java:16) at com.mywds.ejb.entity.EntityProductBean.removeBrand(Unknown Source) at EntityProduct_EntityBeanWrapper838.removeBrand(EntityProduct_EntityBeanWrapp er838.java:1791) at com.mywds.ejb.session.LightWeightBean.updateProduct(Unknown Source) at LightWeight_StatelessSessionBeanWrapper834.updateProduct(LightWeight_Statele ssSessionBeanWrapper834.java:4066) 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:324) at org.apache.axis.providers.java.RPCProvider.invokeMethod(Unknown Source) at org.apache.axis.providers.java.RPCProvider.processMessage(Unknown Source) at org.apache.axis.providers.java.JavaProvider.invoke(Unknown Source) at org.apache.axis.strategies.InvocationStrategy.visit(Unknown Source) at org.apache.axis.SimpleChain.doVisiting(Unknown Source) at org.apache.axis.SimpleChain.invoke(Unknown Source) at org.apache.axis.server.AxisServer.invoke(Unknown Source) at org.apache.axis.transport.http.AxisServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:211) at javax.servlet.http.HttpServlet.service(HttpServlet.java:309) at javax.servlet.http.HttpServlet.service(HttpServlet.java:336) at com.evermind._bxb._crd(.:501) at com.evermind._bxb._ukb(.:170) at com.evermind._cn._uab(.:576) at com.evermind._cn._fm(.:189) at com.evermind._bs.run(.:62)
ClassCastException while doing REMOTE ejb lookup from a web module
Hi, I am getting a ClassCastException when I try to narrow a lookup on a remote stateless session bean from a jsp page. My configuration is orion 1.5.4 with an application for the remote stateless session bean and an application for the web module. For testing purposes, I am running under the same instance of orion. Below is a snippet of code from the jsp page accessing the remote ejb. % KBKTestHome kbkHome = null; KBKTest kbkTest = null; Hashtable env = new Hashtable(); Context jndi = null; env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.PROVIDER_URL, ormi://localhost:23809/kbk-test-application); env.put(javax.naming.Context.SECURITY_PRINCIPAL, admin); env.put(javax.naming.Context.SECURITY_CREDENTIALS, 123); jndi = new InitialContext(env); kbkHome=(KBKTestHome)PortableRemoteObject.narrow( jndi.lookup(ejb/test),KBKTestHome.class); kbkTest = kbkHome.create(); String timeIs = kbkTest.getTime(); % I have modified my orion-application.xml file for the remote ejb to allow read and write namespace access to group RMI. I have also modified my principals.xml file for the remote ejb to give the group RMI rmi:login permissions. I beleive I am finding the home interface to the remote ejb successfully, but can't seem to cast it appropriately. I searched the mailing list archives and found a recent reference to what appears to be a similar problem (http://www.mail-archive.com/orion- [EMAIL PROTECTED]/msg17468.html) However, I did not find a resolution to the problem. Any help is appreciated. Kent Kvarfordt
Re: ClassCastException while doing REMOTE ejb lookup from a web module
Most often this is caused by having a two different compiled versions of your class. Ensure that you have only one copy of the class available to your web-application. If you are using web ejb in the same container, then you can access the classes from the ejb layer in your web app. This document may help you understand where to put your classes: http://kb.atlassian.com/content/atlassian/howto/classloaders.jsp Cheers, Scott [EMAIL PROTECTED] wrote: Hi, I am getting a ClassCastException when I try to narrow a lookup on a remote stateless session bean from a jsp page. My configuration is orion 1.5.4 with an application for the remote stateless session bean and an application for the web module. For testing purposes, I am running under the same instance of orion. Below is a snippet of code from the jsp page accessing the remote ejb. % KBKTestHome kbkHome = null; KBKTest kbkTest = null; Hashtable env = new Hashtable(); Context jndi = null; env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.PROVIDER_URL, ormi://localhost:23809/kbk-test-application); env.put(javax.naming.Context.SECURITY_PRINCIPAL, admin); env.put(javax.naming.Context.SECURITY_CREDENTIALS, 123); jndi = new InitialContext(env); kbkHome=(KBKTestHome)PortableRemoteObject.narrow( jndi.lookup(ejb/test),KBKTestHome.class); kbkTest = kbkHome.create(); String timeIs = kbkTest.getTime(); % I have modified my orion-application.xml file for the remote ejb to allow read and write namespace access to group RMI. I have also modified my principals.xml file for the remote ejb to give the group RMI rmi:login permissions. I beleive I am finding the home interface to the remote ejb successfully, but can't seem to cast it appropriately. I searched the mailing list archives and found a recent reference to what appears to be a similar problem (http://www.mail-archive.com/orion- [EMAIL PROTECTED]/msg17468.html) However, I did not find a resolution to the problem. Any help is appreciated. Kent Kvarfordt -- Scott Farquhar :: [EMAIL PROTECTED] Atlassian :: http://www.atlassian.com Supporting YOUR J2EE World
RE: ClassCastException while doing REMOTE ejb lookup from a web module
Hi, I had a similar problem, and found the post you mentioned. I followed up with Ashok but apparently he is an OC4J developer and i dont think it has been fixed in Orion :( Regards Ryan -Original Message- From: [EMAIL PROTECTED] To: Orion-Interest Sent: 9/04/2002 7:35 AM Subject: ClassCastException while doing REMOTE ejb lookup from a web module Hi, I am getting a ClassCastException when I try to narrow a lookup on a remote stateless session bean from a jsp page. My configuration is orion 1.5.4 with an application for the remote stateless session bean and an application for the web module. For testing purposes, I am running under the same instance of orion. Below is a snippet of code from the jsp page accessing the remote ejb. % KBKTestHome kbkHome = null; KBKTest kbkTest = null; Hashtable env = new Hashtable(); Context jndi = null; env.put(Context.INITIAL_CONTEXT_FACTORY, com.evermind.server.rmi.RMIInitialContextFactory); env.put(Context.PROVIDER_URL, ormi://localhost:23809/kbk-test-application); env.put(javax.naming.Context.SECURITY_PRINCIPAL, admin); env.put(javax.naming.Context.SECURITY_CREDENTIALS, 123); jndi = new InitialContext(env); kbkHome=(KBKTestHome)PortableRemoteObject.narrow( jndi.lookup(ejb/test),KBKTestHome.class); kbkTest = kbkHome.create(); String timeIs = kbkTest.getTime(); % I have modified my orion-application.xml file for the remote ejb to allow read and write namespace access to group RMI. I have also modified my principals.xml file for the remote ejb to give the group RMI rmi:login permissions. I beleive I am finding the home interface to the remote ejb successfully, but can't seem to cast it appropriately. I searched the mailing list archives and found a recent reference to what appears to be a similar problem (http://www.mail-archive.com/orion- [EMAIL PROTECTED]/msg17468.html) However, I did not find a resolution to the problem. Any help is appreciated. Kent Kvarfordt
AW: ClassCastException with struts
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 hi, this sounds definitely like having some jars in the wrong place. you should check for jars and configs in orion/lib that should not be there but should be local to each webapp. (WEB-INF/lib) the struts jar has to be local to each webapp too. there is no common config area for struts. hth, jan - -- Jan Heise / Tel. +49-163-4803237 / [EMAIL PROTECTED] - -Ursprungliche Nachricht- Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]Im Auftrag von Lucas Persona Gesendet: Donnerstag, 28. Februar 2002 14:41 An: Orion-Interest Betreff: ClassCastException with struts Greetings, I've been trying Orion and I'm having some problems using multiple applications (or copy's from the same application). What I have is one application, used (and modified) by some guys. So, each one has his own web-app and application and a source / library directory. The problem seems to be with struts, that always throws a ClassCastException when the second application trys to run. Without using Struts, everything seems to work fine and each application runs separatly. I think that Struts uses some 'common area configuration' that can only be created and used by one instance of a struts. Does anyone had the same problem or knows something to help on that? Thanks in advance and sorry for my English :) Lucas -BEGIN PGP SIGNATURE- Version: PGP 7.0.4 iQA/AwUBPH9Nd5/YNqVvLvLkEQJrEACgrqc+SNyN9+TlkTiOTZbF6FMHdFoAn3mT Sh7hFPe5mL9z6uQOvZuXHfud =2TZa -END PGP SIGNATURE-
Re: AW: ClassCastException with struts
Hello, Jan Heise wrote: this sounds definitely like having some jars in the wrong place you should check for jars and configs in orion/lib that should not be there but should be local to each webapp (WEB-INF/lib) the struts jar has to be local to each webapp too there is no common config area for struts Having struts locally on each webapp, strutsjar in WEB-INF/lib/ and struts-config in WEB-INF/, allows to run just one application without errors (ClassCastException) This happens because all struts-config are the same, just running under different copies of the application But struts doesn't seem to be able to start multiple action-mappings, even running on different webapps Don't know if you had this working already Thanks for your help, Lucas Persona
ClassCastException with struts
Greetings, I've been trying Orion and I'm having some problems using multiple applications (or copy's from the same application) What I have is one application, used (and modified) by some guys So, each one has his own web-app and application and a source / library directory The problem seems to be with struts, that always throws a ClassCastException when the second application trys to run Without using Struts, everything seems to work fine and each application runs separatly I think that Struts uses some 'common area configuration' that can only be created and used by one instance of a struts Does anyone had the same problem or knows something to help on that? Thanks in advance and sorry for my English :) Lucas
ClassCastException while doing REMOTE ejb lookup
Hi I'm doing a REMOTE (not local, not same JVM, not same Orion) lookup from a servlet running in Orion152 application to an ejb deployed in Orion152 application on a remote and different physical machine. I can establish the correct Initial Context and locate the required object. But this object is loaded in the servlet using a ClassLoader that is different from the default ClassLoader of the servlet. The result is a ClassCastException when doing a narrow using this object and the class as loaded by the default ClassLoader. The narrow works fine when the object's ClassLoader is used to locate the class to be used for the narrow. However, it seems that this ClassLoader is then retrieving classes from the remote machine. Obviously I need the classes also on the web machine accesible by the default ClassLoader so that classes that depend on these remote classes can load and JSP's can compile. Any ideas will be greatly appreciated. Please reply at least to my email. -- Regards Theo van Niekerk Generation 5 tel: +27 21 883 88 58 mob: +27 82 44 81 222 msg17464/pgp0.pgp Description: PGP signature
Re: ClassCastException while doing REMOTE ejb lookup
I am working on it and will fix it in the next day or 2. Cheers, Ashok Theo van Niekerk wrote: Hi I'm doing a REMOTE (not local, not same JVM, not same Orion) lookup from a servlet running in Orion152 application to an ejb deployed in Orion152 application on a remote and different physical machine. I can establish the correct Initial Context and locate the required object. But this object is loaded in the servlet using a ClassLoader that is different from the default ClassLoader of the servlet. The result is a ClassCastException when doing a narrow using this object and the class as loaded by the default ClassLoader. The narrow works fine when the object's ClassLoader is used to locate the class to be used for the narrow. However, it seems that this ClassLoader is then retrieving classes from the remote machine. Obviously I need the classes also on the web machine accesible by the default ClassLoader so that classes that depend on these remote classes can load and JSP's can compile. Any ideas will be greatly appreciated. Please reply at least to my email. -- Regards Theo van Niekerk Generation 5 tel: +27 21 883 88 58 mob: +27 82 44 81 222 Part 1.2Type: application/pgp-signature
Junit issues - ClassCastException
Since I saw a question regarding junit and classcastexceptions on this list (before I subscribed to it) just one pointer for everyone: Using stock junit for EJB calls you will run into classcastexceptions because of the custom class loader junit is using. I already asked the junit guys to put this in their FAQ - I spend way to much time to figure out the reason. So, whenever you want to use junit as application client put your remote/home interfaces in excluded.properties within your junit distribution or disable the custom class loader. Jens PS: Do the same for JMS Object messages. BEGIN:VCARD VERSION:2.1 N:Schumann;Jens FN:Jens Schumann NOTE;ENCODING=QUOTED-PRINTABLE:=0D=0A=0D=0A TEL;HOME;VOICE:+49 (441) 594 9118 TEL;CELL;VOICE:+49 (172) 930 5834 ADR;HOME:;;Louise Schroeder Strasse 7;Oldenburg;;26131;Germany LABEL;HOME;ENCODING=QUOTED-PRINTABLE:Louise Schroeder Strasse 7=0D=0AOldenburg 26131=0D=0AGermany URL;WORK:http://void.fm EMAIL;PREF;INTERNET:[EMAIL PROTECTED] EMAIL;INTERNET:[EMAIL PROTECTED] REV:20010815T205757Z END:VCARD
RE: Junit issues - ClassCastException
Worked like a charm; I am much obliged. Reason http://www.exratio.com/ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Jens Schumann Sent: Sunday, September 30, 2001 2:47 AM To: Orion-Interest Subject: Junit issues - ClassCastException Since I saw a question regarding junit and classcastexceptions on this list (before I subscribed to it) just one pointer for everyone: Using stock junit for EJB calls you will run into classcastexceptions because of the custom class loader junit is using. I already asked the junit guys to put this in their FAQ - I spend way to much time to figure out the reason. So, whenever you want to use junit as application client put your remote/home interfaces in excluded.properties within your junit distribution or disable the custom class loader. Jens PS: Do the same for JMS Object messages.
resurrecting the ClassCastException issue
I realize that this has been brought up a few times before, but I haven't seen any resolution in the archives beyond pointing the finger at misconfigured configuration files as being the problem. I'm attempting to run a junit test on an application (I have the main app and a single application client for testing) and every time I try something like: InitialContext jndiContext = new InitialContext(); Object ref = jndiContext.lookup(java:comp/env/ejb/DynamicWorldObject); System.out.println(ref.getClass()); // gives me __Proxy1 Object narrow = PortableRemoteObject.narrow(ref, DynamicWorldObjectHome.class); // and in the line above, it throws the ClassCastException System.out.println(narrow.getClass()); DynamicWorldObjectHome home = (DynamicWorldObjectHome)narrow; DynamicWorldObject dwo = home.create(); it fails with the ClassCastException thrown. I've been through my config files, and I'm obviously just not getting something. It all looks ok to me...I'd appreciate it if someone could eyeball my files and point out my error: -begin application.xml- ?xml version=1.0 ? !DOCTYPE application PUBLIC -//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN http://java.sun.com/j2ee/dtds/application_1_2.dtd application display-nameDynamic World/display-name module ejbDWE.jar/ejb /module module javaDWE-test-client.jar/java /module /application -end application.xml -begin application-client.xml--- ?xml version=1.0 encoding=UTF-8? application-client ejb-ref ejb-ref-nameejb/DynamicWorldObject/ejb-ref-name ejb-ref-typeEntity/ejb-ref-type homecom.twilightminds.dynamicworld.ejbinterface.DynamicWorldObjectHome/ho me remotecom.twilightminds.dynamicworld.ejbinterface.DynamicWorldObject/remo te ejb-linkDynamicWorldObject/ejb-link /ejb-ref ejb-ref ejb-ref-nameejb/TransactionTestA/ejb-ref-name ejb-ref-typeSession/ejb-ref-type hometest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestAHome /home remotetest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestA/r emote ejb-linkTransactionTestA/ejb-link /ejb-ref /application-client end application-client.xml-- begin ejb-jar.xml--- ?xml version=1.0 encoding=UTF-8? ejb-jar descriptionDynamic World Engine/description display-nameDynamic World Engine/display-name enterprise-beans entity ejb-nameDynamicWorldObject/ejb-name homecom.twilightminds.dynamicworld.ejbinterface.DynamicWorldObjectHome/ho me remotecom.twilightminds.dynamicworld.ejbinterface.DynamicWorldObject/remo te ejb-classcom.twilightminds.dynamicworld.ejbinterface.DynamicWorldObjectBea n/ejb-class persistence-typeBean/persistence-type prim-key-classjava.lang.String/prim-key-class reentrantTrue/reentrant /entity session ejb-nameTransactionTestA/ejb-name hometest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestAHome /home remotetest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestA/r emote ejb-classtest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestA Bean/ejb-class session-typeStateful/session-type transaction-typeBean/transaction-type ejb-ref ejb-ref-nameejb/TestB/ejb-ref-name ejb-ref-typeSession/ejb-ref-type hometest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestBHome /home remotetest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestB/r emote ejb-linkTransactionTestB/ejb-link /ejb-ref /session session ejb-nameTransactionTestB/ejb-name hometest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestBHome /home remotetest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestB/r emote ejb-classtest.com.twilightminds.dynamicworld.ejbinterface.TransactionTestB Bean/ejb-class session-typeStateful/session-type transaction-typeBean/transaction-type /session /enterprise-beans /ejb-jar end ejb-jar.xml Reason http://www.exratio.com/
ClassCastException
I have a User class that performs a number of Authentication and user maintenace functions using LDAP to our Corporate Directory, with the javax.naming.directory package. This all works fine and is used by folks from their JSP pages etc under Tomcat V3.2. I have a Session Bean that I'd like to use this User class from. There is a authenticate() and a getUser() method, the getUser() as you can imagine returns an instance of the above User class. When I compile the code as part of the EJB all is fine, if I use the .jar (after moving it into orion/lib/) file then I always get the following 500 Internal Server Error java.lang.ClassCastException: Assigning instance of class javax.naming.InitialContext to field au.edu.nsw.det.comptech.mw.User#LdapCtx at java.io.ObjectInputStream.inputClassFields(ObjectInputStream.java, Compiled Code) at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java, Compiled Code) at java.io.ObjectInputStream.inputObject(ObjectInputStream.java, Compiled Code) at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled Code) at java.io.ObjectInputStream.readObject(ObjectInputStream.java, Compiled Code) at com.evermind[Orion/1.5.2 (build 10460)].server.ejb.EJBUtils.cloneObject(Unknown Source) at Security_StatefulSessionBeanWrapper0.getUser(Security_StatefulSessionBea nWrapper0.java, Compiled Code) at au.edu.nsw.det.comptech.mw.ced.ContractorFacadeBean.logIn(ContractorFaca deBean.java, Compiled Code) at /Contractor.jsp._jspService(/Contractor.jsp.java, Compiled Code)at com.orionserver[Orion/1.5.2 (build 10460)].http.OrionHttpJspPage.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._ah._rad(Unknown Source)at com.evermind[Orion/1.5.2 (build 10460)].server.http.JSPServlet.service(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._abe(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._cxb._uec(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._io._twc(Unknown Source)at com.evermind[Orion/1.5.2 (build 10460)]._io._gc(Unknown Source) at com.evermind[Orion/1.5.2 (build 10460)]._if.run(Unknown Source) the attribute LdapCtx is of type private javax.naming.directory.DirContext Any thoughts of who, what, where, why is going here??? Many thanx Scott.
RE: ClassCastException
To answer my own question... Since LdapDirContext doesn't say it's Serializable, and I didn't really need it as an attribute, I got it moved to just be a variable when needed! Incase someone asked :)
ClassCastException
Here is the error: java.lang.ClassCastException: javax.naming.NameNotFoundException at MyBeanHome_EntityHomeWrapper10.create(MyBeanHome_EntityHomeWrapper10.java:53 7) at tourney.web.TestServlet.createTourney(TestServlet.java:39) Here is the code that causes the error(-- designates line 39): MyBeanHome mb is successfully created in the init method. Date now = new Date(); MyBean m = null; try { -- m = mb.create("mbName", "mbUserName", "mbString", "mbType", "mbGName", "mbReportType", 2, 10, 0, "mbLater", now, now, now, now); } catch(Exception e) { Exception exception = e; PrintStream errorStream = System.err; exception.printStackTrace(errorStream); } :: the create method's prototype: create( String, String, String, String, String, String, int, int, float, String, Date, Date, Date, Date) I have tried casting the create and many other things. I don't understand where the NameNotFoundException is coming from, the Home interface was already found. Any help would be appreciated. --Carl
R: Has anyone ever solved the ClassCastException problem?
Hi Dag, . My code is the orion-primer example (http://www.jollem.com/orion-primer/) that works inside one machine but fails between two machines. It works on two different machines. It works also using resin or others servlet engine for the web side. The orion-primer is a ear with a web application that uses a simple EJB. The code fails in the narrow method below: ... Context context = new InitialContext(); Object boundObject = context.lookup("Hello"); this line should be: Object boundObject = context.lookup "java:comp/env/ejb/Hello"); Are you using a modified version of orion-primer? Hope this help Luciano
RE: Has anyone ever solved the ClassCastException problem?
I have generally found that a ClassCastException (usually nested three-layers deep in ominous sounding Orion exceptions) usually indicates a wrong bean (or class) specified in the deployment descriptor. For instance, I was tearing my hair out over a ClassCastException I was getting every time I tried to add an object to a collection which was a EJB2.0 CMR field. Turns out the problem was a cut-and-paste error when I was creating the relationship in the deployment descriptor - the role-source was a different bean than what I wanted (and specified in the java code). Totally obvious now - but at the time, I was looking at the descriptor, and it "looked right" because all the elements were in the right place. I should point out that this would have been caught with a more obvious message if Orion omitted the cmp-field tag from entity for CMR fields, like the spec says it should :-) Jeff -Original Message- From: Dag Rende [mailto:[EMAIL PROTECTED]] Sent: Friday, December 08, 2000 6:20 AM To: Orion-Interest Subject: Has anyone ever solved the ClassCastException problem? Hi! I have got the infamous ClassCastException problem when casting a home interface got from a context lookup. I have seen many mails about this problem on this list, with good advice and hints. But no one saying that it works. My code is the orion-primer example (http://www.jollem.com/orion-primer/) that works inside one machine but fails between two machines. The orion-primer is a ear with a web application that uses a simple EJB. The code fails in the narrow method below: ... Context context = new InitialContext(); Object boundObject = context.lookup("Hello"); HelloHome helloHome = (HelloHome) PortableRemoteObject.narrow(boundObject, HelloHome.class); ... The EJB works - I can call it using reflection. This proves that I have not made any other mistake. I think this may be a classloader problem in the class produced by the orion RMIInitialContextFactory. The code above works fine inside a java application. Regards, Dag Rende
RE: ClassCastException servletproblem
Use the Java Reflections utilities. Issue myObject.getClass().getName() on the object that you are trying to cast to something and print it out... the variable you call statement... is that a JDBC statement? If it is you should not cast it to whatever the jdbc driver vendor has implemented it as. regards, Patrik Andersson -Original Message-From: Erik Sundberg [mailto:[EMAIL PROTECTED]]Sent: den 14 november 2000 22:10To: Orion-InterestSubject: ClassCastException servletproblem hi, Just started doing servlet programming and using Orion. I made this servlet which compiles just fine but at runtime the server responde with a ClassCastException and I just can´t understand why. Here is where I get the errors: cpool = (ConnectionPool)context.getAttribute("cpool"); org.gjt.mm.mysql.Statement state = (org.gjt.mm.mysql.Statement)statement; the ConnectionPool class is placed in the same package as the Servlet and the jdbc driver is in the /lib dir. I hope this explains my problem, hope anyone can help me I have spent alot of time trying to find out what can be wrong. The casts is legal for sure. thanks, -erik
Re: ClassCastException servletproblem
- Original Message - From: Patrik Andersson To: Orion-Interest Sent: Wednesday, November 15, 2000 4:54 PM Subject: RE: ClassCastException servletproblem Use the Java Reflections utilities. Issue myObject.getClass().getName() on the object that you are trying to cast to something and print it out... the variable you call statement... is that a JDBC statement? If it is you should not cast it to whatever the jdbc driver vendor has implemented it as. I must cast it to be able to access driver specific function org.gjt.mm.mysql.Statement state = (org.gjt.mm.mysql.Statement)statement;long id = state.getLastInsertID(); ( to get the latest autoincrement id) -erik
ClassCastException servletproblem
hi, Just started doing servlet programming and using Orion. I made this servlet which compiles just fine but at runtime the server responde with a ClassCastException and I just can´t understand why. Here is where I get the errors: cpool = (ConnectionPool)context.getAttribute("cpool"); org.gjt.mm.mysql.Statement state = (org.gjt.mm.mysql.Statement)statement; the ConnectionPool class is placed in the same package as the Servlet and the jdbc driver is in the /lib dir. I hope this explains my problem, hope anyone can help me I have spent alot of time trying to find out what can be wrong. The casts is legal for sure. thanks, -erik
ClassCastException
Hi ppl, I have a stateless session bean ChannelManager. I wrote a test class ChannelManagerTest to test the bean. Line 12: ChannelManager channelManager = (ChannelManager) JNDIHelper.getHome("akela.pesos.content.news.ChannelManager"); ( JNDIHelper is tested and is working just fine ) I get the following exception when I execute it: java akela.pesos.client.ChannelManagerTest Exception in thread "main" java.lang.ClassCastException: __Proxy4 at akela.pesos.client.ChannelManagerTest.main(ChannelManagerTest.java:12) jndi.properties is: #Orion JNDI properties #Mon Jul 31 11:09:18 EEST 2000 java.naming.provider.url=ormi\://127.0.0.1\:23791/mall java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory java.naming.security.principal=admin java.naming.security.credentials=123 Any idea ? Peter.
Re: ClassCastException
Sorry ppls, I've found the problem - stupid me :). I've forgotten the home interface. The corrected code is : Line 12: ChannelManagerHome channelManagerHome = (ChannelManagerHome) JNDIHelper.getHome("akela.pesos.content.news.ChannelManager"); ChannelManager channelManager = channelManagerHome.create(); Peter. Peter Severin wrote: Hi ppl, I have a stateless session bean ChannelManager. I wrote a test class ChannelManagerTest to test the bean. Line 12: ChannelManager channelManager = (ChannelManager) JNDIHelper.getHome("akela.pesos.content.news.ChannelManager"); ( JNDIHelper is tested and is working just fine ) I get the following exception when I execute it: java akela.pesos.client.ChannelManagerTest Exception in thread "main" java.lang.ClassCastException: __Proxy4 at akela.pesos.client.ChannelManagerTest.main(ChannelManagerTest.java:12) jndi.properties is: #Orion JNDI properties #Mon Jul 31 11:09:18 EEST 2000 java.naming.provider.url=ormi\://127.0.0.1\:23791/mall java.naming.factory.initial=com.evermind.server.ApplicationClientInitialContextFactory java.naming.security.principal=admin java.naming.security.credentials=123 Any idea ? Peter.
ClassCastException confusion
Hi all I have a class that is connecting to 2 beans. The one bean works while the other gives me a java.lang.ClassCastException: __Proxy4 at com.test.manager.TestManager.main(TestManager.java:45) exception. I have checked the listings. I could not find a similar case where one bean worked and the other did not. Object homeObject = initcontext.lookup("java:comp/env/TestManager"); TestManagerHome home = (TestManagerHome )PortableRemoteObject.narrow(homeObject, TestManagerHome .class); TestManager locator = (TestManager)PortableRemoteObject.narrow(home.create(), TestManager.class); Ta
RE: EJB ClassCastException doesn't make sense..
Actually..yes..that is what I meant. :) -Original Message- From: KirkYarina [mailto:[EMAIL PROTECTED]] Sent: Friday, October 27, 2000 1:11 PM To: Orion-Interest Subject: Re: EJB ClassCastException doesn't make sense.. At 11:27 AM 10/27/00 -0700, you wrote: Context context = new Context(); By any chance should this be new InitialContext() ? Object ref = context.lookup("java:comp/env/ejb/Test"); TestHome th = (TestHome) PortableRemoteObject.narrow(ref, TestHome.class); Test t = th.create(); t.test(); Kirk Yarina [EMAIL PROTECTED]
EJB ClassCastException doesn't make sense..
Hey all, I am getting an error when my serlvet accesses an EJB that in its code is accessing another ejb. Below I am listing the error, the code and the ejb-jar.xml file. I am using Orion 1.2.9. I am not sure if this is a bug with 1.2.9, or why this would be happening. I took code snippets from an EJB 1.1 book and I have been looking over my code, xml, etc several times and it all appears to be correct..so I am not sure why this is happening. From what I have read, it appears that when an EJB needs to use another, whether its an entity or session, it does the same code that a servlet would do to access an EJB..it does a JNDI lookup. IS this correct? Also, from what I have read, it appears that when an ejb uses another, you need to set the ejb-ref tags in the first ejb, so it can "see" the other ejb. Is this correct? Did I do this correctly in my snippet below (ejb-jar.xml)? If I am only referencing the Test ejb from the first ejb (Login), do I need to define the Test ejb in the ejb-jar.xml as well, as I have done? So my problem is..why am I getting a ClassCastException when trying to execute the login() method? Oh..I did narrow down the line of code in the EJB LoginBean to where it does the PortableRemoteObject.narrow() call on the Test bean. The snippet line is: TestHome th = (TestHome) PortableRemoteObject.narrow(ref, TestHome.class); This is where the exception is thrown. If I comment out the few lines the LoginBean does to get the Test..their is no exception thrown and the LoginBean ejb works fine. So it is definitely with it trying to get the Test EJB. Thanks for any help.. / Exception output / Orion/1.2.9 initialized com.evermind.server.rmi.OrionRemoteException: java.lang.ClassCastException at com.evermind.server.ejb.EJBUtils.getUserException(JAX) at Login_StatelessSessionBeanWrapper0.login(Login_StatelessSessionBeanWr apper0.java:60) at com.company.ui.actions.LoginAction.executeCommandDefault(LoginAc tion.java:38) at java.lang.reflect.Method.invoke(Native Method) at com.company.ui.actions.DefaultAction.perform(DefaultAction.java: 77) at org.apache.struts.action.ActionServlet.processActionInstance(ActionSe rvlet.java:794) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:702 ) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:332) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at com.evermind.server.http.du.rr(JAX) at com.evermind.server.http.du.forward(JAX) at com.evermind.server.http.d5.rx(JAX) at com.evermind.server.http.d5.rw(JAX) at com.evermind.util.f.run(JAX) Nested exception is: java.lang.ClassCastException at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(Porta bleRemoteObject.java:296) at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137) at com.company.ejb.session.login.LoginBean.login(LoginBean.java:36) at Login_StatelessSessionBeanWrapper0.login(Login_StatelessSessionBeanWr apper0.java:54) at com.company.ui.actions.LoginAction.executeCommandDefault(LoginAc tion.java:38) at java.lang.reflect.Method.invoke(Native Method) at com.company.ui.actions.DefaultAction.perform(DefaultAction.java: 77) at org.apache.struts.action.ActionServlet.processActionInstance(ActionSe rvlet.java:794) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:702 ) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:332) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at javax.servlet.http.HttpServlet.service(HttpServlet.java) at com.evermind.server.http.du.rr(JAX) at com.evermind.server.http.du.forward(JAX) at com.evermind.server.http.d5.rx(JAX) at com.evermind.server.http.d5.rw(JAX) at com.evermind.util.f.run(JAX) /*** EJB-JAR.XML / ?xml version="1.0"? !DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 1.1//EN" "http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd" ejb-jar descriptionCompany ejbs/description display-nameCompany EJB/display-name enterprise-beans session descriptionLogin bean for logging in people/description display-namecom.company.ejb.session.login.Login/display-name ejb-namecom.company.ejb.session.login.Login/ejb-name homecom.company.ejb.session.login.LoginHome/home remotecom.company.ejb
Re: EJB ClassCastException doesn't make sense..
At 11:27 AM 10/27/00 -0700, you wrote: Context context = new Context(); By any chance should this be new InitialContext() ? Object ref = context.lookup("java:comp/env/ejb/Test"); TestHome th = (TestHome) PortableRemoteObject.narrow(ref, TestHome.class); Test t = th.create(); t.test(); Kirk Yarina [EMAIL PROTECTED]
RE: EJB ClassCastException problem
Title: RE: EJB ClassCastException problem Thanks Karl. I missed the parent attribute because I've been looking at older docs in my 1.2.9 install area which don't have it. Maybe it was put in since 1.2.9. The udated docs on orionserver.com contain the parent attribute. I probably should've been more clear in my response. I really wasn't trying to say the concept of application namespace domains was a limitation in of itself. It does make sense. I was really trying to say that if you can't access or share components across apps, then that would be a limitation. The parent attribute looks like that will do what we want. I'll try it out. Hopefully my ejb-refs will work as well. -Original Message- From: Karl Avedal [mailto:[EMAIL PROTECTED]] Sent: Saturday, September 30, 2000 7:04 AM To: Orion-Interest Subject: Re: EJB ClassCastException problem Hello Erin, Look at http://www.orionserver.com/docs/auto/attributes/parent_(server.xml_-_application).html The parent attribute is used for exactly what you want, a child application sees the objects of its parents, so you can have an application hierarchy where you have shared EJBs in the root node and more specialized in the children. By default every application has the global application as their parent (just like all Java classes inherit java.lang.Object). Example: application name=utils path=../applications/utils.ear auto-start=true/ application name=webshop path=../applications/webshop.ear auto-start=true parent=utils/ (This is in server.xml btw) The rationale behind having a domain/application based JNDI tree is the same as the rationale behind OO. You want to hide the different applications from eachother, so that they don't interfere with eachother. This is especially useful when you deploy 3rd party applications or in hosting environments when an Orion instance is possibly shared between more than one user. Regards, Karl Avedal Erin Hill wrote: I have had that same problem. Like you, I have been pulling my hair out trying to figure out how to access a component in one application from a component in another. I too stumbled upon the RMIInitialContextFactory as well but I cannot cast/narrow objects obtained via JNDI. I always get a ClassCastException. I have temporarily gotten around the problem by using reflection to call methods but it's not a solution. I think it's a bug in Orion. I believe it's a class loader issue. The object returned from JNDI and the class object you pass to narrow have different class loaders - it appears to me each application has its own class loader. I am frustrated by the fact that I cannot access beans across application domains without resorting to proprietary incantations. ejb-refs do not work either across domains - deployment fails.. I think this feature is a non-comformance of the J2EE/EJB specs. The spec says nothing about partitioning the namespace. The container should resolve the ejb-ref no matter where the referenced bean resides. Other application servers I have tried employ a flat namespace and do not have these issues. Overall I think Orion is a good product but I see application namespace domains as a limitation. I really don't see the rationale behind the design. You cannot see another apps namespace with the JNDI context provided by the container but you CAN using another context (RMIInitialContextFactory). Seems inconsistent to me. Ill be interested to see how they handle domains when they implement IIOP/CosNaming for EJB 2.0. Will C++ CORBA clients see a flat namespace?
Re: EJB ClassCastException problem
Hello Erin, Look at http://www.orionserver.com/docs/auto/attributes/parent_(server.xml_-_application).html The parent attribute is used for exactly what you want, a child application sees the objects of its parents, so you can have an application hierarchy where you have shared EJBs in the root node and more specialized in the children. By default every application has the global application as their parent (just like all Java classes inherit java.lang.Object). Example: application name="utils" path="../applications/utils.ear" auto-start="true"/ application name="webshop" path="../applications/webshop.ear" auto-start="true" parent="utils"/ (This is in server.xml btw) The rationale behind having a domain/application based JNDI tree is the same as the rationale behind OO. You want to hide the different applications from eachother, so that they don't interfere with eachother. This is especially useful when you deploy 3rd party applications or in hosting environments when an Orion instance is possibly shared between more than one user. Regards, Karl Avedal Erin Hill wrote: I have had that same problem. Like you, I have been pulling my hair out trying to figure out how to access a component in one application from a component in another. I too stumbled upon the RMIInitialContextFactory as well but I cannot cast/narrow objects obtained via JNDI. I always get a ClassCastException. I have temporarily gotten around the problem by using reflection to call methods but it's not a solution. I think it's a bug in Orion. I believe it's a class loader issue. The object returned from JNDI and the class object you pass to narrow have different class loaders - it appears to me each application has its own class loader. I am frustrated by the fact that I cannot access beans across application domains without resorting to proprietary incantations. ejb-refs do not work either across domains - deployment fails.. I think this "feature" is a non-comformance of the J2EE/EJB specs. The spec says nothing about partitioning the namespace. The container should resolve the ejb-ref no matter where the referenced bean resides. Other application servers I have tried employ a flat namespace and do not have these issues. Overall I think Orion is a good product but I see application namespace domains as a limitation. I really don't see the rationale behind the design. You cannot see another apps namespace with the JNDI context provided by the container but you CAN using another context (RMIInitialContextFactory). Seems inconsistent to me. Ill be interested to see how they handle domains when they implement IIOP/CosNaming for EJB 2.0. Will C++ CORBA clients see a flat namespace?
EJB ClassCastException problem
I have had that same problem. Like you, I have been pulling my hair out trying to figure out how to access a component in one application from a component in another. I too stumbled upon the RMIInitialContextFactory as well but I cannot cast/narrow objects obtained via JNDI. I always get a ClassCastException. I have temporarily gotten around the problem by using reflection to call methods but it's not a solution. I think it's a bug in Orion. I believe it's a class loader issue. The object returned from JNDI and the class object you pass to narrow have different class loaders - it appears to me each application has its own class loader. I am frustrated by the fact that I cannot access beans across application domains without resorting to proprietary incantations. ejb-refs do not work either across domains - deployment fails.. I think this "feature" is a non-comformance of the J2EE/EJB specs. The spec says nothing about partitioning the namespace. The container should resolve the ejb-ref no matter where the referenced bean resides. Other application servers I have tried employ a flat namespace and do not have these issues. Overall I think Orion is a good product but I see application namespace domains as a limitation. I really don't see the rationale behind the design. You cannot see another apps namespace with the JNDI context provided by the container but you CAN using another context (RMIInitialContextFactory). Seems inconsistent to me. Ill be interested to see how they handle domains when they implement IIOP/CosNaming for EJB 2.0. Will C++ CORBA clients see a flat namespace?
EJB ClassCastException problem
Hi everyone, I have this problem when I try to get the home interface of the EJB, using a servlet to access EJBs from another application on the same server. When I call the PortableRemoteObject.narrow(..) method, it throws the exception: java.lang.ClassCastException: StampHome_EntityHomeWrapper1 Below is what I have in my code... Hashtable env = new Hashtable(); env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory"); env.put(Context.PROVIDER_URL,"ormi://p500.cheapdull.mine.nu/stamp"); env.put(Context.SECURITY_PRINCIPAL,"admin"); env.put(Context.SECURITY_CREDENTIALS,"123"); context = new InitialContext(env); Object boundObject = context.lookup("Stamp"); stamph = (stamp.ejb.StampHome) PortableRemoteObject.narrow(boundObject, stamp.ejb.StampHome.class); I tried to print the class name of 'boundObject' out, and it is stamp.ejb.StampHome (the correct home interface). I have search through the past posts in this mailing list, and read that some people said it is a bug in orion...is it true? or did I do something silly there? Any suggestion much appreciated. Regards, James.
ClassCastException.
Title: RE: EJB 2.0 status. When we check in servlets from SourceSafe into the "servlet-container" we get ClassCastException on some other support class. And that happends every time. I suppose that is because our supporting class gets reloaded by the servlet classloader even though it is already loaded by some other classloader. It's really anyoing since the only way that I can think of around this problem is to restart the application server. regards, Patrik Andersson
ClassCastException
Hi all, Another quick question. I have a globally allocated (application scope) bean that manages my dbconnection pooling system. I've been seeing a lot of "java.lang.ClassCastException: DBConnectionPool". When I'm doing development on various jsp's and beans that utilise this as an include (e.g. jsp:useBean id="dbConnection" class="DBConnectionPool" scope="application"(. Basically nothing will work after I see this until the server is restarted. Hints on why this is happening would be appreciated. Marty