ClassCast Exception Again

The problem follows:
          I have session bean (all classes are in the example package) MySession.
          From some Java Bean I access my session bean like this:
          Context ic = new InitialContext();
          Object objref = ic.lookup("MySessionJNDI");
          mySessionHome = (example.MySessionHome)
          PortableRemoteObject.narrow(objref, example.MySessionHome.class);
          But, after this line I get the exception:
          java.lang.ClassCastException: example.MySessionEJBHomeImpl_ServiceStub
          Can anyone help me?
          Peter.
          

I am so sory, but this did not help.
          Do you have some other idea what might be a problem?
          Thanks.
          "Sajan" <[email protected]> wrote in message
          news:[email protected]...
          >
          > hi peter,
          > what I can guess u need to provide few details to as parameter
          > to InitialContext(*****);
          > I am writing few lines here,
          >
          > Properties h = new Properties();
          > h.put(Context.INITIAL_CONTEXT_FACTORY,
          "weblogic.jndi.WLInitialContextFactory");
          > h.put(Context.PROVIDER_URL, "t3://localhost:7001");
          > h.put(Context.SECURITY_PRINCIPAL, "system");
          > h.put(Context.SECURITY_CREDENTIALS , "password");
          >
          > Context ctx = new InitialContext(h);
          > Object obj = (Object)ctx.lookup("MySessionJNDI");
          > MySesHome home = (MySesHome)PortableRemoteObject.narrow(obj,
          MySesHome.class);
          >
          >
          > after this u can get reference to remote interface as
          > MySesRemote remot = home.create()
          >
          > hope this works,
          > bye
          > sajan
          >
          > "Peter" <[email protected]> wrote:
          > >The problem follows:
          > > I have session bean (all classes are in the example package)
          MySession.
          > > From some Java Bean I access my session bean like this:
          > > Context ic = new InitialContext();
          > > Object objref = ic.lookup("MySessionJNDI");
          > > mySessionHome = (example.MySessionHome)
          > >PortableRemoteObject.narrow(objref, example.MySessionHome.class);
          > >But, after this line I get the exception:
          > > java.lang.ClassCastException:
          example.MySessionEJBHomeImpl_ServiceStub
          > > ....
          > >
          > >Can anyone help me?
          > >
          > >Peter.
          > >
          > >
          >
          

Similar Messages

  • EJB 3.0 JNDI lookup results in Classcast Exception

    Hello everybody,
    I�m experiencing a strange problem when I want to retrieve a stateless session bean from a POJO in my enterprise app. I am using EJB 3.0, running on Glassfish build 33 and JDK 1.5.
    I have successfully deployed my ear file which has the EJB.jar and the war file in it. I�m using JSF 1.2 in the web app and I am able to use all session beans using the injection annotation in my managed beans (this is how it is supposed to be according to the spec.). However, I now need to acces a stateless session bean from a POJO (non-managed or backing bean) which resides also in the war file. I�m using the following code to retrieve the session bean:
    (where IMySessionBean = remote interface and MySessionBean is the implementation)
    try {
    ic = new InitialContext();
    MySessionBean mybean = (MySessionBean )ic.lookup("env/IMySessionBean");
    When casting the object from the lookup into MySessionBean I get a classcast Exception. However, I can see the session bean using the JNDI browser that comes with Glassfish and it�s deployed and available. If mybean is of type Object, I see that the lookup method returns a wrapper of my session bean.
    Here�s what the stacktrace says:
    java.lang.ClassCastException: com.myproject.ejb.interfaces._IMySessionBean_Wrapper
         at ...
    Do I miss something here and there�s more required to obtain a reference to the session bean? I�m pretty much stuck here and any help is greastly appreciated!
    Thanks in advance!
    Cheers,
    Joerg

    Hi Joerg,
    In the session bean client view, the bean implementation class is never used. The client
    only interacts with the local or remote interface.
    Regarding the lookup, the more portable approach is to
    lookup the ejb reference through the component environment of the web application
    rather than doing a direct global lookup. If you have already defined any ejb reference
    injections somewhere in the web app, you can look up the same dependencies via
    java:comp/env. For example, if your managed bean has the following @EJB annotation :
    @EJB(name="mybeanref") IMySessionBean beanRef;
    You can look up the same underlying dependency in your utility class :
    IMySessionBean beanRef = (IMySessionBean) new InitialContext().lookup
    ("java:comp/env/mybeanref");
    Note that the portion of the lookup string after java:comp/env/ comes from the name() attribute
    of @EJB. @EJB name() has the same semantics as the ejb-ref-name in the deployment
    descriptor. You can find more info on these topics in our EJB FAQ :
    https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

  • Another ClassCast Exception!!

    Hi,
              I waded though the earlier classcast exception discussions and felt that
              my case was slightly different so here it goes
              I am using Weblogic Server v 4.51.
              I have my application servlets in a jar file which is included in the
              servlet classpath in the weblogic.properties file.It is not in the
              system classpath.
              I have two scenarios which fail with identical exceptions.
              I have one servlet which on one type of request stores an object into
              the session
              and on another type of request retrieves it from the session.This object
              is of a type which we have created ChartHTML and is in a jar file which
              is also in the servlet classpath.When I retrieve the ChartHTML object
              from the session it throws a classcast exception.The code line is as
              follows
              ChartHTML = (ChartHTML) session.getValue("chart");
              I am not trying to change any classes in midsession or anything.I am
              able to
              get other values previously stored in the session but they are plain
              java Strings.
              This has worked for months under JRun.
              Any help will be appreciated
              Santosh
              

    It could be in retreiving from the DB? If you have a binary type that you are storing text in, sometimes a class cast exception is thrown (though not always) if you try and push that straight into a String ie String s = resultSet.getString("actuallyABinaryFied");
    It also depends on the DB and drivers you are using. My experience of this is with mySql and mm drivers
    Just a thought...

  • Random classcast exception - com.sun.jndi.cosnaming.CNCtxFactory

    Hi,
    I am trying to use a remote ejb (weblogic 8.1.5/ jdk 14) from a j2se 1.5 rmi-iiop client.
    If I use com.sun.jndi.cosnaming.CNCtxFactory to look up the remote home & then use the remote interface, I get the following error RANDOMly (i.e only some calls succeed).
    java.lang.ClassCastException
         at xxx.equals(xxxjava:129)
         at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1471)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
         at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
         at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
         at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
         at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
         at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
         at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
         at weblogic.iiop.RMIMsgOutput.writeObject(RMIMsgOutput.java:117)
         at xxx.yyy_ehqjge_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    I had a look at IndirectionValueHashtable class. It looks like the classcast is happening because the "handle-to-object" map has non String values.
    Could this be a corba compatabilty issue?
    The problem doesn't occur if I use weblogic initial context factory & t3 protocol.
    What is the best way to overcome this problem? I dont want to distribute weblogic.jar [from 8.1.5 server]. wlclient is okay.
    thanks

    Tony Zimmer <> writes:
    Certainly looks like a bug, in which case you need to go through
    support to get it fixed. Do however check that your objects are in
    fact serializable (including all their fields).
    andy
    Tried a few more combinations. No luck so far.
    classcast exception for some objects at some times
    server: WebLogic Server 10.0 / Sun 1.5.0_06/ WinNT 6
    client: Sun jdk 1.5.0_11/1.4.2_14
    java.lang.ClassCastException: java.lang.String
         at xxxpack.client.PaymentReceipt.equals(PaymentReceipt.java:881)
         at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1836)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1992)
         at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2253)
         at weblogic.utils.io.ObjectStreamClass.writeFields(ObjectStreamClass.java:413)
         at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:235)
         at weblogic.corba.utils.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:182)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1957)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1992)
         at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2253)
         at weblogic.utils.io.ObjectStreamClass.writeFields(ObjectStreamClass.java:413)
         at weblogic.corba.utils.ValueHandlerImpl.writeValueData(ValueHandlerImpl.java:235)
         at weblogic.corba.utils.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:182)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1957)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1992)
         at weblogic.iiop.IIOPOutputStream.writeObject(IIOPOutputStream.java:2253)
         at xxxpack.server.ProcessPayment_ehqjge_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
         at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:224)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:479)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:475)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:59)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:1016)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:200)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:172)
    server: WebLogic Server 8.1 SP6 / Sun 1.4.2_11 / WinNT 6
    client jdk 1.4.2_14/1.5.0_11:
    java.lang.ClassCastException
         at xxxpack.client.PurchaseAmount.equals(PurchaseAmount.java:148)
         at weblogic.corba.utils.IndirectionValueHashtable.get(IndirectionValueHashtable.java:119)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1471)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
         at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
         at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
         at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
         at com.sun.corba.se.internal.io.IIOPOutputStream.writeObjectField(IIOPOutputStream.java:685)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputClassFields(IIOPOutputStream.java:745)
         at com.sun.corba.se.internal.io.IIOPOutputStream.defaultWriteObjectDelegate(IIOPOutputStream.java:167)
         at com.sun.corba.se.internal.io.IIOPOutputStream.outputObject(IIOPOutputStream.java:526)
         at com.sun.corba.se.internal.io.IIOPOutputStream.simpleWriteObject(IIOPOutputStream.java:123)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValueInternal(ValueHandlerImpl.java:136)
         at com.sun.corba.se.internal.io.ValueHandlerImpl.writeValue(ValueHandlerImpl.java:116)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1593)
         at weblogic.iiop.IIOPOutputStream.write_value(IIOPOutputStream.java:1624)
         at weblogic.iiop.RMIMsgOutput.writeObject(RMIMsgOutput.java:117)
         at xxxpack.server.ProcessPayment_ehqjge_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:491)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:120)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:434)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:429)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
    Do you have a list/ martix of client-server versions used for the bug fixes?
    Thanks

  • Why do i get classcast exception for this code

    import java.util.*;
    public class Test1{
    public static void main(String a[]){
    Set s = new TreeSet();
    s.add(new Person(20));
    s.add(new Person(10));
    System.out.println(s);
    class Person{
    Person(int i){}
    }

    basically classcast exception is thrown when the class can not be casted with the proper form that is demanded.
    1> in case of set the value should be mutually comparable. but unfortunately in you code you have not implemented comparable interface. you should implement that interface.
    2> after using the comparable interface you should implement the method <class object 1>.compateTo(<class object 2>)
    the above two process should exclude the exception from you code hopefully.
    check out!

  • DropdownByKey UI element is giving Classcast exception

    Hi
    In my webdynpro view if i add "DropdownbyKey" UI element and the run the application,it is giving Classcast Exception.i am getting following error
    The initial exception that caused the request to fail, was:
       java.lang.ClassCastException
        at com.sap.tc.webdynpro.progmodel.context.Paths.getAttributeInfoFor(Paths.java:202)
        at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.DropDownByKeyAdapter.setViewAndNodeElement(DropDownByKeyAdapter.java:240)
        at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:231)
        at com.sap.tc.webdynpro.clientimpl.html.uielements.adaptmgr.URAdapterManager.getAdapterFor(URAdapterManager.java:64)
        at com.sap.tc.webdynpro.clientimpl.html.uielib.standard.uradapter.FlowLayoutAdapter$Items.getControl(FlowLayoutAdapter.java:318)
        ... 39 more
    Please help
    thanks
    Prasad

    Hi Sriram,
    You need to bind the property "selectedKey"  for the DropdownByKey UIElement
    http://help.sap.com/saphelp_nw04/helpdata/en/08/13dbfb6e779743bb2ca641ebcb3411/frameset.htm
    Regards, Anilkumar

  • How do I permanently set a popup exception. I can set an exception, but everytime I leave FF and connect again, I have to set the exception again.

    How do I permanently set a popup exception. I can set an exception, but every time I leave FF and connect again, I have to set the exception again. Can I set it once on a permanent basis?

    In case you are using "Clear history when Firefox closes":
    *do not clear Site Preferences
    *Tools > Options > Privacy: History: [X] Clear history when Firefox closes > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    Note that clearing "Site Preferences" clears all exceptions for cookies, images, pop-up windows, software installation, and passwords.

  • Classcast exceptions when persistence units deployed as shared libraries

    Hi
    We are using weblogic 10.3.3 & eclipse link 2.0 persistent units:
    We have uim-entities.jar(persistent unit) under uim-core-lib.ear(/APP-INF/lib) that is deployed as a shared library. We have multiple applications(ears) referring to this shared library (same persistent name, "default") using lib-ref in weblogic-application.xml. We are facing issue while deploying and running the application.(Primarily classcast exceptions on log4j classes and entity DAOs). If the persistent unit is replication in each app's APP-INF/lib, we are not seeing those exceptions.
    Are there any known issues in using persistent units as shared libraries.
    Pasting the exception for your reference:
    log4j:ERROR Could not create an Appender. Reported error follows.
    java.lang.ClassCastException: org.apache.log4j.ConsoleAppender cannot be cast to org.apache.log4j.Appender
    at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:238)
    at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:171)
    at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:184)
    at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:502)
    at org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:415)
    at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:919)
    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:790)
    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:682)
    at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:811)
    at oracle.communications.inventory.api.framework.logging.LogFactory.<clinit>(LogFactory.java:176)
    at oracle.communications.inventory.api.framework.listener.InventoryEntityLifeCycleEventListener.<clinit>(InventoryEntityLifeCycleEventListener.java:36)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at org.eclipse.persistence.internal.security.PrivilegedAccessHelper.getClassForName(PrivilegedAccessHelper.java:88)
    at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListenerMetadata.getClassForName(EntityListenerMetadata.java:158)
    at org.eclipse.persistence.internal.jpa.metadata.listeners.EntityListenerMetadata.process(EntityListenerMetadata.java:311)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.MappedSuperclassAccessor.processEntityListeners(MappedSuperclassAccessor.java:796)
    at org.eclipse.persistence.internal.jpa.metadata.accessors.classes.EntityAccessor.processListeners(EntityAccessor.java:1064)
    at org.eclipse.persistence.internal.jpa.metadata.MetadataProcessor.addEntityListeners(MetadataProcessor.java:104)
    at org.eclipse.persistence.internal.jpa.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:327)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:151)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:207)
    at org.eclipse.persistence.internal.jpa.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:195
    Thanks,
    Murali

    Murali,
    Hi, the CCE for Apache Log4J is outside of the scope of JPA - i have not see the "oracle.communications.inventory.api.framework.logging" package in play before - what kind of connection factory are you using or are you using JTA?
    Note: WebLogic 10.3.4.0 has been upgraded to enable container managed persistence context injection and no longer requires the use of shared libraries. See the wiki post...
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#Enabling_JPA2_support
    For WebLogic 10.3.3.0 and JPA 2.0 usage as application managed libraries using the <wls:prefer-application-packages/> weblogic-application.xml tag see the wiki post...
    http://wiki.eclipse.org/EclipseLink/Development/JPA_2.0/weblogic#DI_1.1:_Alternative_3:_Application_Level_Shared_Library_-InUse
    thank you
    /Michael O'Brien
    http://www.eclipselink.org

  • BC4J using Tomcat DataSource: ClassCast Exception

    Hi
    need help with this problem:
    i have deployed a bc4j module to tomcat.
    the module is confgured to use an excisting datasource within the servlets context.
    everything works fine, like
    o ApplicationModule is created (using the correct Datasource on Tomcat)
    o a ViewObject is looked up by name
    but here it starts to get messy:
    executing the a query on the ViewObject leads to a ClassCast Exception (see below)
    One additional remark:
    The same code works fine, when using a Connection instead of a DataSource.
    But this is J2EE, so why not use a DataSource ?
    Thanks for any ideas
    Volker
    java.lang.ClassCastException: org.apache.commons.dbcp.DelegatingPreparedStatement
         at oracle.jbo.server.OracleSQLBuilderImpl.doStatementSetRowPrefetch(OracleSQLBuilderImpl.java:976)
         at oracle.jbo.server.DBTransactionImpl.createPreparedStatement(DBTransactionImpl.java:3346)
         at oracle.jbo.server.DBTransactionImpl2.createPreparedStatement(DBTransactionImpl2.java:425)
         at oracle.jbo.server.DBTransactionImpl.createReUsePreparedStatement(DBTransactionImpl.java:4173)
         at oracle.jbo.server.ViewObjectImpl.getPreparedStatement(ViewObjectImpl.java:7750)
         at oracle.jbo.server.QueryCollection.buildResultSet(QueryCollection.java:586)
         at oracle.jbo.server.QueryCollection.executeQuery(QueryCollection.java:547)
         at oracle.jbo.server.ViewObjectImpl.executeQueryForCollection(ViewObjectImpl.java:3422)
         at oracle.jbo.server.ViewRowSetImpl.execute(ViewRowSetImpl.java:663)
         at oracle.jbo.server.ViewRowSetImpl.executeQueryForMasters(ViewRowSetImpl.java:769)
         at oracle.jbo.server.ViewRowSetImpl.executeQuery(ViewRowSetImpl.java:706)
         at oracle.jbo.server.ViewObjectImpl.executeQuery(ViewObjectImpl.java:3363)
         at de.mtag.demo.server.Demo.start(Demo.java:88)

    I know it´s been a long time since you've posted this question. But did you resolve this problem ? I'm having the exact same situation here.
    Any help would be good.
    Thanks a lot,
    John

  • Classcast exception while sending objects to the server

    I'm getting classcast exception when i try to send objects from the java webstart application at the client side to a server. Its working fine if I do the same without using javaweb start. I'm using hessian client to send objects to the server.
    I've a web app that gets outlook contacts from the client machine and send those to the server. I'm sending these contacts as custom objects(OutlookContact) to the server using hessian client. But these objects are being sent to the server as String objects but not as OutlookContact objects. I don't know whats happening. Can anyone please tell me is there any setting that I need to set in the jnlp file.
    thanks,
    Jayaram

    I am also getting the same error. Please anybody can help

  • Cannot pair Bluetooth with 2008 BMW - 'Uncaught exception: java.lang.​Classcast Exception' message

    I have been trying to pair my 8100 with my new 2008 model BMW 135i built in car kit using Bluetooth set up. The phone finds the car kit and the two appear to pair (confirmation numbers entered etc) but then the Smartphone screen freezes and the following error message appears 'Uncaught exception: java.lang.Classcast Exception'. The phone cannot then receive or make calls (won't even turn off until battery removed). Have been through the whole process several times. The car will pair with other phones and my 8100 will pair OK with other devices. Can anyone help?
    Thanks, Paul.

    I have got aorund the problem by disabling address book transfer. I can now receive calls and make outgoing calls by either dialling on the blackberry itself or using the BMW idrive controller. It is better than nothing and my main use anyway is for incoming calls while driving. The whole idea of the integrated system was to be able to scroll through the address book on the steering wheel buttons and view the address book entries on the satnav screen.
    I have had similar problems in the past with an integrated system in a Porsche. The Blackberry never establised bluetooth contact with that system at all.

  • ClassCast Exception during EJB lookup

    Context ctx = new InitialContext();
    Object ref = ctx.lookup("MessageSender");
    SenderHome senderHome= (SenderHome)PortableRemoteObject.narrow(ref,SenderHome.class);
    sender = senderHome.createSender();
    where MessageSender is the JNDI name of bean.
    The error is ::
    java.lang.ClassCastException: com.sap.message.sender.SenderHome#
    I have even tried SenderHome senderHome = (SenderHome)ref
    bcos SenderHome is locally deployed. I have also tried with SenderLocalHome ,but it also gives ClassCast Exception.
    Message was edited by:
            Shilpa Bhanot

    Hi,
    Have you tried to find out what the class actually is ?
    <code>
    Context ctx = new InitialContext();
    Object ref = ctx.lookup("MessageSender");
    Object objUnknown= PortableRemoteObject.narrow(ref,SenderHome.class);
    System.out.println ("Class of object is :" +objUnknown.getClass());
    </code>

  • Beta version of Weblogic 6.0 and classcast exception error.

    As an FYI to those who have be receiving the "dreaded" classcast
              exception error, the new version of Weblogic seems to fix the problem.
              It took me awhile to figure out how th deploy the web application, but
              once I did the application seemed to work w/o a problem (and w/o the
              error).
              Paul Garduno
              

    We do not offer a JDBC driver for Linux in version 5.1. In version 6.0,we
    do offer a type 4 driver for Linux.
    In version 5.1, I suggest trying the platform independent type 4 JDBC driver
    available for free from Oracle. It is supported (as is any JDBC driver)
    with WebLogic Server. To download it:
    Go to http://www.oracle.com and select the "Download" option.
    From the resulting page, use the "Select Utility or Driver" dropdown to
    select Oracle JDBC drivers
    From the resulting page, scroll down a little (since SQLJ stuff appears at
    the top).
    Or, to go directly there:
    http://technet.oracle.com/software/tech/java/sqlj_jdbc/software_index.htm
    Thanks,
    Michael
    Michael Girdley, BEA Systems Inc
    Learning WebLogic? Buy the book.
    http://www.learnweblogic.com/
    "Michael W. Warren, Sr." <[email protected]> wrote in message
    news:[email protected]..
    I have installed WebLogic 6.0 on Solaris platform and verified that the
    server comes up
    and that I can connect to it via Netscape. Next step was to verify
    installation of WebLogic
    jDriver for Oracle. When I run the following:
    java utils.dbping ORACLE scott tiger
    I get the following error:
    Starting Loading jDriver/Oracle .....
    Error encountered:
    java.sql.SQLException: System.loadLibrary threw
    java.lang.UnsatisfiedLinkError
    with the message
    '/ldatae/bea/wlserver6.0/lib/solaris/oci816_8/libweblogicoci37.so:
    ld.so.1: /ldatae/bea/jdk130/jre/bin/../bin/sparc/native_threads/java:
    fatal: libgen.so.1: open failed: No such file or directory'.
    at
    weblogic.jdbcbase.oci.Driver.loadLibraryIfNeeded(Driver.java:202)
    at weblogic.jdbcbase.oci.Driver.connect(Driver.java:57)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:146)
    at utils.dbping.main(dbping.java:182)
    Anyone seen this? Help!!!
    Thanks in advance
    Mike Warren, Sr.
    [email protected]

  • Classcast Exception Issue

    we are seeing a strange error in server logs .
    Scenario
    'Interface1' is implemented by 'Class1' . 'Class2' extends 'Class1'
    Issue
    statement : Interface1 intf = (Interface1) Map.get(<KEY>) throws classcast exception
    Stack-trace shows that the class it found is 'Class2'
    java.lang.ClassCastException:
    Class2
    What could be the possible cause here ?.Issue due to Classloading?. Can this happen if 'Class2' is loaded by one classloader ( child ) and 'Interface1' is loaded by parent classloader?
    Thanks
    Joseph

    jcgeorge wrote:
    Issue due to Classloading?. Can this happen if 'Class2' is loaded by one classloader ( child ) and 'Interface1' is loaded by parent classloader?Yes, for example if the child classloader doesn't delegate to its parent classloader and the interface and class are loaded by different classloaders.

  • Classcast exception which getting the ISendMailService instance.

    Hi all,
    I am getting classcast exception at the below line.
    ISendMailService sendMailSvc = ResourceFactory.getInstance().getServiceFactory().getService(ISendMailService.SERVICE_ID);
    Any clue.?? It was working fine. but suddenly getting this exception.
    Regards,
    Svia

    Hi I have a WD with the same problem. I posted a thread
    https://www.sdn.sap.com/irj/sdn/thread?threadID=117080
    do you find any solution to this problem?

Maybe you are looking for

  • Enabling the ability to uncheck QT file associations in Default Programs

    I have Windows 7 here, and it comes with this nice little utility that lets you set the default programs for various file types (Control Panel\All Control Panel Items\Default Programs\Set Default Programs\Set Program Associations). When I select Quic

  • 2 different websites on one server.

    Hi. I would like to make 2 different websites on one server. One that's basically a professional website, and the other that's devoted entirely for photos from my travels only. Can someone tell me how I can create two websites and hyperlink one to th

  • Preformance tuning

    Hi All, Could you please tell me why this query is taking more time in a package where it is define under a item procedure, but when I not using this in my package which is a outbound taking data from oracle to staging table, this query execute fast

  • Cisco VPN Client wont install Error 1406

    Hello I am installing Cisco VPN Client on my Windows 7 32-bit  laptop but it doesn't work. I have downloaded VPN Client ver "vpnclient-win-msi-5.0.07.0410-k9" which is supposed to be assigned for Win 32 bit but i get a lot of error like his: "Error 1

  • Losing serial numbers under Vista x64/Boot Camp

    I have Vista x64 installed under Leopard 10.5.2 under Bootcamp (running fine). I installed a 64-bit version of an animation program that required that I enter a bunch of serial numbers for its various modules. The app ran fine after I finished. But w