ClassCastException at OracleImplicitConnectionCache setConnection method.

Hi,
I am using OracleConnectionCacheManager to cache the OracleDataSource connection. So I have been calling createCache method of OracleConnectionCacheManager with datasource and cache properties. So I am getting an ClassCastExceptiond
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.Properties
at oracle.jdbc.pool.OracleImplicitConnectionCache.setConnectionCacheProperties(OracleImplicitConnectionCache.java:1848)
at oracle.jdbc.pool.OracleImplicitConnectionCache.<init>(OracleImplicitConnectionCache.java:184)
at oracle.jdbc.pool.OracleConnectionCacheManager.createCache(OracleConnectionCacheManager.java:270)
at oracle.jdbc.pool.OracleConnectionCacheManager.createCache(OracleConnectionCacheManager.java:172)
I google this exception but did not find anything, so thought to dig it. So I decompiled the class file of OracleImplicitConnectionCache, in setConnectionCacheProperties method of this class I found a line, which I think the cause of the problem.
Properties properties1 = (Properties)properties.get("AttributeWeights")
I just want to know whether it is right or not. If it is right then what could be the reason of this exception and how can I resolve it?
If no, then how can I make it work? I mean is there any patch available?
Thanks in advance.

even if isAssignableFrom returns false, still it can work.....
here is how
Object notificationServiceObject = initialContext.lookup(NotificationServiceHome.JNDI_NAME);          
//Key Step
Object notificationServiceRawObject = ((org.jnp.interfaces.MarshalledValuePair)
notificationServiceObject).get();
NotificationServiceHome notificationServiceHome =
          (NotificationServiceHome)javax.rmi.PortableRemoteObject.narrow
(notificationServiceRawObject,NotificationServiceHome.class);
NotificationService notificationService = notificationServiceHome.create();

Similar Messages

  • ClassCastException from OraclePreparedStatement.setArrayInternal() method

    The following code throws a ClassCastException from oracle.jdbc.driver.OraclePreparedStatement.setArrayInternal() method line# 5886 when cs.setArray() is executed.
    Connection conn = getConnection(); // Returns a java.sql.Connection instance
    CallableStatement cs = conn.prepareCall(queryString);
    cs.setArray(1, new UsnArray(usns)); // UsnArray implements java.sql.Array
    cs.registerOutParameter(2, Types.INTEGER);
    cs.execute();
    This works if I create the CallableStatement on an oracle.jdbc.driver.OracleConnection instance and use an oracle.sql.ARRAY instance in the setArray() method call. A JDBC-compliance driver shouldn't be expecting the applications to use driver-specific classes. The application can pass any instance of type java.sql.Array in the setArray() method call.
    Is this a bug in the driver?
    Driver information from ojdbc14.jar manifest.mf file:
    Manifest-Version: 1.0
    Specification-Title: Oracle JDBC driver classes for use with JDK14
    Sealed: true
    Created-By: 1.4.2_08 (Sun Microsystems Inc.)
    Implementation-Title: ojdbc14.jar
    Specification-Vendor: Oracle Corporation
    Specification-Version: Oracle JDBC Driver version - "10.2.0.2.0"
    Implementation-Version: Oracle JDBC Driver version - "10.2.0.2.0"
    Implementation-Vendor: Oracle Corporation
    Implementation-Time: Tue Jan 24 08:55:21 2006
    Name: oracle/sql/converter/
    Sealed: false
    Name: oracle/sql/
    Sealed: false
    Name: oracle/sql/converter_xcharset/
    Sealed: false
    --------------------------------------------------------------------------------------------------

    Let me elaborate on your last two replies: it doesn't matter what other drivers support; it doesn't matter what your "intention" was; all that matters is whether the implementation adheres to the specification or not. If it is not, it is not compliant to the specification (period). It is a very strong statement to say that "You must use oracle.sql.ARRAY." I'm not quite sure you understand the meaning and motivation behind standards like JDBC and J2EE and standards bodies like ANSI. This is very obvious when you say that "This is a limitation of the expressiveness of the Java type system."
    If you think the JDBC compliance only mandates that "A driver is only required to accept a value that is of the concrete class defined by the driver," which is not mentioned anywhere in the spec anyway, then Sun would have simply defined the setArray method as "public void setArray(int i, oracle.sql.ARRAY x)" (one for each driver available) instead of saying "public void setArray(int i, java.sql.Array x)". It also clearly says that if a specification is not supported by a driver, in which case it must be specified in the DatabaseMetaData, the driver must throw a SQLEception. Bur your claim completely contradicts everything. You can also refer links like this on the Web: http://archives.postgresql.org/pgsql-jdbc/2003-07/msg00294.php.
    I don't know what you mean by "The JDBC spec is not as precise as it could be." The relevant requirements have been clearly stated throughout Chapter 13 “Statements” and in Appendix B "Data Type Conversion Tables" in JDBC 3.0 spec (Chapter 8 Section 3 "Arrays" in JDBC 2.1 spec).
    A JDBC driver may provide underlying data source-specific features in addition to those mandated by the JDBC specification. Applications that try to take advantage these additional features may decide to “stick” with a specific driver and import driver-specific classes. But these additional features cannot substitute the basic requirements.

  • Getting ClassCastException while calling a method in webservice

    I wrote small webservice using axis. It is returning array of object(of xyz type) where an object is a Value object.
    I created stubs and place at client side as a jar file. xyz.class is also there in stubs list.
    While calling that webservice im getting the following exception.can u please help me on this?
    The code is:
    xyz[] so     =     lmsDel.getNumber();
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: java.lang.ClassCastException: [Ljava.lang.Object;
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}hostname:evoke12
    java.lang.ClassCastException: [Ljava.lang.Object;
    at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder
    .java:222)
    at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.
    java:129)
    at org.apache.axis.encoding.DeserializationContext.endElement(Deserializ
    ationContext.java:1087)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endEleme
    nt(AbstractSAXParser.java:633)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scan
    EndElement(XMLNSDocumentScannerImpl.java:719)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1685)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImp
    l.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:834)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(X
    ML11Configuration.java:764)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.
    java:148)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Ab
    stractSAXParser.java:1242)
    at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:133)
    at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:153)
    at javax.xml.parsers.SAXParser.parse(SAXParser.java:375)
    at org.apache.axis.encoding.DeserializationContext.parse(Deserialization
    Context.java:227)
    at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
    at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
    at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnders
    tandChecker.java:62)
    at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
    at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
    at org.apache.axis.client.Call.invoke(Call.java:2767)
    at org.apache.axis.client.Call.invoke(Call.java:2443)
    at org.apache.axis.client.Call.invoke(Call.java:2366)
    at org.apache.axis.client.Call.invoke(Call.java:1812)
    at com.cscinfo.webservice.client.LmsServiceSoapBindingStub.getSOPCountBy
    NatureOfCase(Unknown Source)
    at com.cscinfo.cscglobal.web.action.EnterCSCGlobalAction.execute(EnterCS
    CGlobalAction.java:68)
    at org.apache.struts.action.RequestProcessor.processActionPerform(Reques
    tProcessor.java:421)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:226)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:116
    4)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:397)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
    (StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
    tyHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
    a:283)
    at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at com.cj.trim.trimFilter.doFilter(Unknown Source)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogicx.servlet.gzip.filter.GZIPFilter.doFilter(GZIPFilter.java:70)
    at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
    va:42)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:3229)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    121)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
    ervletContext.java:2002)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
    ontext.java:1908)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
    ava:1362)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    Edited by: avn_venki on Jan 30, 2008 1:17 AM

    Delegate definition:
    public xyz[] getCount(String accessType,long orgId,Date fromDate,Date toDate)
              return lmsServiceImpl.getCount(accessType,orgId,fromDate,toDate);
    Calling code in client:
    xyz[] so     =     lmsDel.getCount("group",l,calendar,calendar);
    Do i need to add anything to the wsdd file for the xyz bean type??

  • ClassCastException when calling finder-method

    Hello,
    i want to get all results from my table. Therefore i created an entity bean with a new finder method ejbFindAll which returns a Collection.
    In my stateless session bean i am instantiating the entity bean in this way:
    +CustomerLocalHome myCustomerLocalHome = null;
    Context myContext = new InitialContext();
    myCustomerLocalHome =(CustomerLocalHome) myContext.lookup("/bsp_ear/CustomerBean");+
    When i now call the method in this way:
    + myCustomerLocalHome.findAll();+
    i get a ClassCastExcetpion.
    Does anybody know what this causes?
    I tried for hours an could not find a solutions
    Thanks for help,
    André

    Hi Andre,
             Just a suggestion.
    In your deployment descriptor what class you have written against EJBNAME ?Is tht CustomerLocalHome??
    Rdgs,
    Guru

  • ClassCastException in oracle.sql.BLOB.createTemporary

    Hi,
    I'm having a ClassCastException problem using the method oracle.sql.BLOB.createTemporary while trying to store a BLOB value (JDBC classes12.jar). The problem is quite clear - if I use the method with a dedicated database connection that specifies the driver as oracle.jdbc.driver.OracleDriver there is no problem - if I use it with an Orion datasource shipped with Oracle IAS10g it gives me a ClassCastException. I imagine that somewhere in the code of this method there is a cast of the underlying connection leading to the ClassCastException when used in conjunction with the Orion datasource. The code to save the BLOB is as follows:
    oracle.sql.BLOB blob = oracle.sql.BLOB.createTemporary(st.getConnection(), false,
    oracle.sql.BLOB.DURATION_SESSION);
    blob.open(BLOB.MODE_READWRITE);
    OutputStream out = blob.getBinaryOutputStream();
    try {
    out.write((byte[])value);
    out.flush();
    out.close();
    } catch (IOException e) {
    throw new SQLException("failed write to blob" + e.getMessage());
    blob.close();
    ((oracle.jdbc.OraclePreparedStatement)(st)).setBLOB(index, blob);
    My questions are:
    (1) is it possibile to save a BLOB type with a different version of Oracle JDBC without having to rely on the Oracle specific implementation of the JDBC interface (the cast of the PreparedStatement to oracle.jdbc.OraclePreparedStatement is quite ugly and not very portable!).
    (2) if not, then how can I get this code to work with the datasource implementation for Oracle IAS.
    thanks in advance for any help.
    Dara.

    If you are using OCI driver, you may check whether using thin driver would avoid ClassCastException.

  • Timestamplockingpolicy - ClassCastException

    In our workshop, we are using Toplink latest version. I am trying to use TimestampLockingPolicy on a DB2 database table. The attribute is lastUpdatedAt which is java.sql.Timestamp. When I am running the application, I am getting ClassCastException in DatabasePlatform.getTimestampFromServer() method.
    [15:49:13] <DEBUG> SELECT DISTINCT CURRENT TIMESTAMP FROM SYSIBM.SYSTABLES
    [15:49:13] <DEBUG> reconnecting to external connection pool
    [15:49:13] <DEBUG>
    [15:49:13] <DEBUG>
    [15:49:13] <DEBUG> After JTS Completion
    [15:49:13] <DEBUG> release unit of work
    [15:49:13] <DEBUG> client released
    <Oct 7, 2005 3:49:13 PM EDT> <Error> <EJB> <BEA-010026> <Exception occurred during commit of transaction Name=[EJB dcf.hsn.hotline.bt.HotlineIntakeBean.createReporterVO(dcf.hsn.hotline.model.AbuseReporterVO)],Xid=BEA1-0065AA4AB1767F28EDB9(14423883),Status=Rolled back. [Reason=java.lang.ClassCastException],numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=0,seconds left=30,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=myserver),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@17d603e),SCInfo[mydomain+myserver]=(state=rolledback),properties=({weblogic.transaction.name=[EJB dcf.hsn.hotline.bt.HotlineIntakeBean.createReporterVO(dcf.hsn.hotline.model.AbuseReporterVO)], ISOLATION LEVEL=2, weblogic.jdbc=t3://205.176.221.148:7001}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=myserver+205.176.221.148:7001+mydomain+t3+, XAResources={},NonXAResources={})],CoordinatorURL=myserver+205.176.221.148:7001+mydomain+t3+): java.lang.ClassCastException
         at oracle.toplink.internal.databaseaccess.DatabasePlatform.getTimestampFromServer(DatabasePlatform.java:921)
         at oracle.toplink.descriptors.TimestampLockingPolicy.getInitialWriteValue(TimestampLockingPolicy.java:85)
         at oracle.toplink.descriptors.TimestampLockingPolicy.getNewLockValue(TimestampLockingPolicy.java:95)
         at oracle.toplink.descriptors.VersionLockingPolicy.updateRowAndObjectForUpdate(VersionLockingPolicy.java:607)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.updateWriteLockFields(DatabaseQueryMechanism.java:1034)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.updateObjectForWriteWithChangeSet(DatabaseQueryMechanism.java:993)
         at oracle.toplink.queryframework.WriteObjectQuery.executeCommitWithChangeSet(WriteObjectQuery.java:107)
         at oracle.toplink.internal.queryframework.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:258)
         at oracle.toplink.queryframework.WriteObjectQuery.execute(WriteObjectQuery.java:51)
         at oracle.toplink.queryframework.DatabaseQuery.execute(DatabaseQuery.java:523)
         at oracle.toplink.publicinterface.Session.internalExecuteQuery(Session.java:1962)
         at oracle.toplink.publicinterface.UnitOfWork.internalExecuteQuery(UnitOfWork.java:2255)
         at dcf.hsn.framework.dao.toplink.TOPLinkProfiler.profileExecutionOfQuery(TOPLinkProfiler.java:67)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1084)
         at oracle.toplink.publicinterface.Session.executeQuery(Session.java:1038)
         at oracle.toplink.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:177)
         at oracle.toplink.publicinterface.Session.writeAllObjectsWithChangeSet(Session.java:3227)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabase(UnitOfWork.java:1092)
         at oracle.toplink.publicinterface.UnitOfWork.commitToDatabaseWithChangeSet(UnitOfWork.java:1137)
         at oracle.toplink.publicinterface.UnitOfWork.issueSQLbeforeCompletion(UnitOfWork.java:2492)
         at oracle.toplink.jts.AbstractSynchronizationListener.beforeCompletion(AbstractSynchronizationListener.java:151)
         at weblogic.transaction.internal.ServerSCInfo.callBeforeCompletions(ServerSCInfo.java:1010)
         at weblogic.transaction.internal.ServerSCInfo.startPrePrepareAndChain(ServerSCInfo.java:115)
         at weblogic.transaction.internal.ServerTransactionImpl.localPrePrepareAndChain(ServerTransactionImpl.java:1142)
         at weblogic.transaction.internal.ServerTransactionImpl.globalPrePrepare(ServerTransactionImpl.java:1868)
         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:250)
         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:221)
         at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:289)
         at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:141)
         at dcf.hsn.hotline.bt.HotlineIntakeBean_w350tc_EOImpl.createReporterVO(HotlineIntakeBean_w350tc_EOImpl.java:56)
         at dcf.hsn.hotline.bt.HotlineIntakeBean_w350tc_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:166)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
         at dcf.hsn.hotline.bt.HotlineIntakeBean_w350tc_EOImpl_812_WLStub.createReporterVO(Unknown Source)
         at dcf.hsn.hotline.pt.CreateReportPartBInputCommand.saveCreateReportPartB(CreateReportPartBInputCommand.java:719)
         at dcf.hsn.hotline.pt.CreateReportPartBInputCommand.handleSaveAction(CreateReportPartBInputCommand.java:226)
         at dcf.hsn.hotline.pt.CreateReportPartBInputCommand.execute(CreateReportPartBInputCommand.java:134)
         at dcf.hsn.framework.pt.controller.FrontController.execute(FrontController.java:206)
         at dcf.hsn.framework.pt.controller.FrontController.service(FrontController.java:260)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
         at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
         at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
         at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
         at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    So what is wrong? My guess is the query that gets executed to retrieve current timestamp from DB2 is getting String, whereas it is cast to something else. Please let me know how to solve this problem.
    Thanks in advance,
    Jagadeesh

    Hi Doug,
    sorry for the delay in replying. I have executed the sample code that retrieves current timestamp from db2 database. Here is the code and output.
    Test Code:
    ValueReadQuery query = new ValueReadQuery();
    query.setSQLString("SELECT DISTINCT CURRENT TIMESTAMP FROM SYSIBM.SYSTABLES");
    Object object = getSession().executeQuery(query);
    System.out.println("Object Type returned for timestamp ==>" + object.getClass().getName());
    String tm = (String)object;
    System.out.println("Time stamp string from database===>"+tm);
    Output Log:
    [11:45:54] <DEBUG> SELECT DISTINCT CURRENT TIMESTAMP FROM SYSIBM.SYSTABLES
    [11:45:54] <DEBUG> reconnecting to external connection pool
    Object Type returned for timestamp ==>java.lang.String
    Time stamp string from database===>2005-10-18-11.45.33.880186
    I have used ValueReadQuery because I remember reading somewhere either in toplink documentation or in forums that to read the timestamp from database, internally toplink uses ValueReadQuery when TimestampLockingPolicy is used. But we are no longer concerned with nano seconds and we have decided to use localtime. Though we have support agreement, I am not filing a TAR for this reason.
    But let me explain what I am trying to do and what toplink is doing.
    I am reading an object and displaying the values on a web form. On the web form I am storing the lastUpdatedTimestamp as a hidden variable. Once the form is updated and submitted, I am building the object from the form. Now the object will have updated values and the same lastUpdatedTimestamp value which is there in the original object built by reading from the database. I want to use this lastUpdatedTimestamp value in the where clause of update query. Now in my DAO layer, I read the object from unitOfWork and merge clone the object that I have built from the web form. I have set TimestampLockingPolicy in my mappings.
    The problem is Toplink is using the timestamp from the object read with unitOfWork. That means it is using the latest timestamp value from the database which I do not want.
    How can I make toplink to use whatever timestamp value that I have set in the form object that I am trying to merge clone while building the update query's where clause? Please give me a solution for this.
    Thanks,
    Jagadeesh

  • SOAP Handler and ClassCastException during Header Processing

    Hello,
    I am getting a ClassCastException when trying to process the SOAPHeader in a SOAP
    handler. I tried the following...inside the handleRequest(MessageContext context)
    method:
    SOAPPart soapPart=null;
    SOAPEnvelope soapEnvelope=null;
    SOAPHeader soapHeader=null;
    SOAPMessageContext soapContext=(SOAPMessageContext) context;
    System.out.println("handleRequest");
    SOAPMessage soapMessage=soapContext.getMessage();
    System.out.println("SOAPMessage: "+soapMessage.toString());
    try
    soapPart=soapMessage.getSOAPPart();
    soapEnvelope=soapPart.getEnvelope();
    soapHeader=soapEnvelope.getHeader();
    System.out.println("SOAPHeader: "+soapHeader.toString());
    soapHeader.addTextNode("CustomNode");
    Iterator allHeaders=soapHeader.examineHeaderElements("http://someuri.com");
    The examineHeaderElements throws a ClassCastException, no matter what method gets
    invoked on the soapHeader object. I tried casting this to the weblogic.webservice.core....
    implemented objects. The result is the same.
    I appreciate any help.
    Thanks,
    Adam
    Athi D. Athimuthu
    [WLSSOAPHeaderIssue.txt]

    Hi Mike,
    Thank you for your response. Yes, I was trying to cast the elements returned from
    examineHeaderElements to SOAPHeaderElement. This was throwing a ClassCastException.
    Now, I am using
    soapHeader.getChildElements(nodeName)
    This seems to work fine. Where I created the nodeName through SOAPEnvelope's createNode()
    method. Don't know what the original problem was. But, now I avoided using that
    API. Will let you know if I get any more information.
    Regards,
    Adam
    "Michael Wooten" <[email protected]> wrote:
    >
    Hi Adam,
    The java.util.Iterator returned from the examineHeaderElements() method,
    should
    contain javax.xml.soap.SOAPHeaderElement objects. Is that what you are
    trying
    to cast to?
    Regards,
    Mike Wooten
    "Adam Athimuthu" <[email protected]> wrote:
    Hello,
    I am getting a ClassCastException when trying to process the SOAPHeader
    in a SOAP
    handler. I tried the following...inside the handleRequest(MessageContext
    context)
    method:
    SOAPPart soapPart=null;
    SOAPEnvelope soapEnvelope=null;
    SOAPHeader soapHeader=null;
    SOAPMessageContext soapContext=(SOAPMessageContext) context;
    System.out.println("handleRequest");
    SOAPMessage soapMessage=soapContext.getMessage();
    System.out.println("SOAPMessage: "+soapMessage.toString());
    try
    soapPart=soapMessage.getSOAPPart();
    soapEnvelope=soapPart.getEnvelope();
    soapHeader=soapEnvelope.getHeader();
    System.out.println("SOAPHeader: "+soapHeader.toString());
    soapHeader.addTextNode("CustomNode");
    Iterator allHeaders=soapHeader.examineHeaderElements("http://someuri.com");
    The examineHeaderElements throws a ClassCastException, no matter what
    method gets
    invoked on the soapHeader object. I tried casting this to the weblogic.webservice.core....
    implemented objects. The result is the same.
    I appreciate any help.
    Thanks,
    Adam
    Athi D. Athimuthu

  • Crystal Report Viewer Credential Prompt for Report with Dynamic Parameters

    The .NET Crystal Report Viewer is prompting for database credentials when launching a report containing dynamic parameters. This only occurs for reports created with SAP Crystal Reports 2011 designer. Reports created with Crystal Reports XI designer (where dynamic parameters were first introduced) work correctly.
    The credential prompt window contains the following fields:
    - Server Name: <server name> (disabled)
    - Database Name: <database name> (disabled)
    - User Name: <empty> (enabled)
    - Password: <empty> (enabled)
    - Use Single Signon Key: false (disabled)
    The values in the prompt window which are disabled are the database connection values used during the design of the report in the SAP Crystal Reports 2011 designer.
    Expected Result:
    - No prompt for database credentials.
    - Values read from the database should be populated in a drop down for the dynamic parameters.
    Environment:
    - Visual Studio 2010 (C#)
    - Windows 7 Enterprise
    - SAP Crystal Reports runtime engine for .NET Framework 4
    - SAP Crystal Reports, version for Visual Studio 2010
    - SAP Crystal Reports 2011
    The database connection is being set to use a DSN. It must be a DSN as the calling application is only aware of the DSN/Username/Password values. These values are being passed to the Crystal Report Viewer contained in a Windows form.
    The database connection for the report is being set as follows:
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection otherwise the connection does not work
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Supposed to set the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    The SetConnection method's signature is as follows:
       SetConnection(string server, string database, string name, string password)
    As you can see from the code snippet above I am setting the DSN name as the server parameter, blank for the database parameter (a database connection using DSN should only require DSN name/Username/Password) and the database username and password respectively.
    Is this a SAP bug?
    Is this the correct way of setting the database connection to use a DSN?
    Is there some other properties that need to be set somewhere else in the report through code?
    Any help would be greatly appreciated.

    Thanks for the pointer to the database connection code generator. After taking a look at the output from the tool I was able to finally get the dynamic parameters to load and populate properly without prompting for credentials. I needed to tweak the outputted code a bit to match my requirements of using a DSN only connection.
    Instead of updating the database connection properties contained within the Report.Database.Tables collection from the CrystalReports.Engine namespace, I changed it to replace the database connection properties in the Report.ReportClientDocument.DatabaseController.Database.Tables collection from the CrystalDecisions.ReportAppServer.DataDefModel namespace. For one reason or another, using the RAS namespace solved the problem.
    Below is the updated code with the change made:
    using RAPTable = CrystalDecisions.ReportAppServer.DataDefModel.Table;
    foreach (InternalConnectionInfo internalConnectionInfo in this.report.DataSourceConnections)
        // Must set the UseDSNProperties flag to True before setting the database connection
        if (internalConnectionInfo.LogonProperties.ContainsKey("UseDSNProperties"))
            internalConnectionInfo.LogonProperties.Set("UseDSNProperties", true);
        // Sets the database connection for all objects in the report (ie. main report, tables, sub reports)
        internalConnectionInfo.SetConnection(this.DSN, string.Empty, this.LoginName, this.Password);
    // The attributes for the QE_LogonProperties which is part of the main property bag
    PropertyBag innerPropertyBag = new PropertyBag();
    innerPropertyBag.Add("DSN", this.DSN);
    innerPropertyBag.Add("UserID", this.LoginName);
    innerPropertyBag.Add("Password", this.Password);
    innerPropertyBag.Add("UseDSNProperties", "true");
    // The attributes collection of the tables ConnectionInfo object
    PropertyBag mainPropertyBag = new PropertyBag();
    mainPropertyBag.Add("Database DLL", "crdb_ado.dll");
    mainPropertyBag.Add("QE_DatabaseType", "OLE DB (ADO)");
    mainPropertyBag.Add("QE_LogonProperties", innerPropertyBag);
    // Pass the database properties to a connection info object
    ConnectionInfo connectionInfo = new ConnectionInfo();
    connectionInfo.Attributes = mainPropertyBag;
    connectionInfo.Kind = CrConnectionInfoKindEnum.crConnectionInfoKindCRQE;
    connectionInfo.UserName = this.LoginName;
    connectionInfo.Password = this.Password;
    // Replace the database connection properties of each table in the report
    foreach (RAPTable oldTable in this.report.ReportClientDocument.DatabaseController.Database.Tables)
        RAPTable table = new RAPTable();
        table.ConnectionInfo = connectionInfo;
        table.Name = oldTable.Name;
        table.QualifiedName = oldTable.QualifiedName;
        table.Alias = oldTable.Alias;
        this.report.ReportClientDocument.DatabaseController.SetTableLocation(oldTable, table);
    this.report.VerifyDatabase();
    Thanks again Ludek for the help.

  • Very slow loading time - Crystal Reports Viewer 2008

    Hi,
      I search this forum to find another thread regarding this issue.  Since I've found nothing in particular, I started this one.
      We are currently developping a new report engine based on the .Net Crystal Report Viewer. This engine will be used in our applications to show, print and export reports.  We based the engine on the Crystal Report 2008 version (12.0.2000).  The code is in C#, targeted on the Framework 3.5 SP1.  For the CR runtime, we tested on machines with the SP2 and SP3 versions, as well as on a computer with Crystal Report Developper installed (v12.3.0.601) with no runtimes.  Since the runtime is in x86 only, the engine is compiled in x86 (not ANY CPU)
      When we try to open a report in an application, the first report loading is unusally slower than the others.  If I open a report, close it and open it a second time, the second time is much faster than the first.  While reading the threads, I realized that the first load implies some assembly loading from the Framework (which is normal).
      But since i can take as long as 20-30 seconds to load the first report, I ran some test.  Using the System.AppDomain.CurrentDomain.AssemblyLoad event, I've tracked the assemblies being loaded when opening the report and the start time of the loading.  I've discovered that, while most of the CR assemblies takes less than 500 milliseconds to load, there is one that takes at least 3 seconds (20 seconds sometimes) to load : BusinessObjects.Licensing.KeyCodeDecoder.  Each time I ran the tests, it is the assembly that is the slowest (and by far) among them all.
      Prior to this, we were using Delphi with the Crystal Report 10 runtime.  We never had such issues.  Now, some customers are complaining about this behavior.
      For you information, we are using the ReportDocument.Load() method to load documents.  Our reports are all dynamically linked to the database with the DataSourceConnections.SetConnection() method.  The report is being loaded in the viewer using the CrystalReportViewer.ReportSource property.
      Why does it takes so long to load/execute ? Is there something implied with registry keys or Internet access ?  Is there a way to speed up things ?
      Thanks !

    Thanks for your help Don ! :o)
    I know that the CR10 runtime was built on win32 and while I knew that the .Net version of the runtime would be slower due to the Framework and .Net architecture, we did not expect such differences between the two methods.
    You are right that the hardware could play a great factor here, but since I work on this machine for a few years now and I saw the performance from the old CRPE32.dll and the new .Net counterpart, I am really surprised that there is such a difference.  Most of our customers have entry-level desktops and our application always ran well on it, until now.
    So, if it is the way that the CR 2008 runtime works, do you know if your developpers optimized this part with the next version (CR 2010) or it is based on the same engine ?
    Thanks again for your time !

  • Return value of Custom object in HashMap

    I have created a custom object (TableValue) that should represent the key value in aHashMap. When reading data from a file, the custom object should be either a String or a Double. I want the custom object to return the proper type. That is, I am trying to avoid the use of an Object as a key value in the HashMap. However, I want TableValue to return the proper value. Some example code is listed below. My question is this, how do I get TableValue to return the proper type?
    Thanks
    import java.util.HashMap;
    public class Table {
    HashMap<TableValue,Frequency>table=new HashMap<TableValue,Frequency>();
         public void count(TableValue aElement){
              Frequency fq=table.get(aElement);
              if(fq==null){
                   fq=new Frequency();
                   table.put(aElement, fq);
              }else{
                   fq.add();
         public double getCount(TableValue aElement){
              Frequency fq=table.get(aElement);
              if(fq==null){
                   return 0.0;
              }else{
                   return fq.getFrequency();
         public static void main(String[] args) {
              Table tab=new Table();
              tab.count(new TableValue("s"));
              tab.count(new TableValue(5.0));
    public class TableValue {
         private double dValue;
         private String sValue;
         private boolean isDouble=false;
         public TableValue(Object o){
              try{
                   if(o.getClass().getName().equals("java.lang.String")){
                        sValue=(String)o;
                   }else if(o.getClass().getName().equals("java.lang.Double")){
                        dValue=(Double)o;
              }catch(ClassCastException ex){
            //next two methods not correct, can not overload like this
         public double getValue(){
              //want to return a double
              return dValue;
         public String getValue(){
              //want to returna string
              return sValue;
    public class Frequency {
         private double total, cummulativeFrequency;
         public Frequency(){
              total = 1.0;
              cummulativeFrequency = 0.0;
         public void add(){
              total++;
              cummulativeFrequency++;
         public void addCummulativeFrequency(double aLowerCount){
              cummulativeFrequency += aLowerCount;
         public double getFrequency(){
              return total;
         public double getCummulativeFrequency(){
              return cummulativeFrequency;
    }

    OK, thanks to everyone for your help. Here is what I have done. I added equals(), hashCode(), and compareTo().
    My compareTo() method seems a bit sloppy. Basically, I want Strings to appear before Doubles in a sort. Is there a better way to do this?
    import java.util.Arrays;
    import java.util.HashMap;
    import java.util.Iterator;
    public class Table {
         HashMap<TableValue,Frequency>table=new HashMap<TableValue,Frequency>();
         public void count(TableValue aElement){
              Frequency fq=table.get(aElement);
              if(fq==null){
                   fq=new Frequency();
                   table.put(aElement, fq);
              }else{
                   fq.add();
         public double getCount(TableValue aElement){
              Frequency fq=table.get(aElement);
              if(fq==null){
                   return 0.0;
              }else{
                   return fq.getFrequency();
         public Object[] getKeyArray(boolean sorted){
              TableValue[] keys=new TableValue[table.size()];
              int i=0;
              for(Iterator iter=table.keySet().iterator();iter.hasNext(); ){
                   keys[i++]=(TableValue)iter.next();
              if(sorted){
                   Arrays.sort(keys);
              return keys;
         public static void main(String[] args) {
              Table tab=new Table();
              tab.count(new TableValue("a"));
              tab.count(new TableValue("a"));
              tab.count(new TableValue("d"));
              tab.count(new TableValue(5.3));
              tab.count(new TableValue(6.123));
              Object[] keys = tab.getKeyArray(true);
              System.out.println("count " + tab.getCount((TableValue)keys[0]));
    public class TableValue implements Comparable{
         private Double dValue;
         private String sValue;
         public TableValue(String sValue){
              this.sValue=sValue;
         public TableValue(double dValue){
              this.dValue=dValue;
         public Double getDoubleValue(){
              return dValue;
         public String getStringValue(){
              return sValue;
         public boolean isDouble(){
              if(dValue!=null) return false;
              return true;
         public boolean equals(Object o) {
              return o.equals(sValue) || o.equals(dValue);
         public int hashCode(){
              int hash=0;
              hash += (null == dValue ? 0 : dValue.hashCode());
              hash += (null == sValue ? 0 : sValue.hashCode());
              return hash;
           public int compareTo(Object anotherTableValue) throws ClassCastException{
                if(!(anotherTableValue instanceof TableValue))
                     throw new ClassCastException("TableValue object expected.");
                //compareTo for two Doubles
                if(((TableValue)anotherTableValue).getDoubleValue()!=null &&
                          this.getDoubleValue()!=null){
                     System.out.println("yes" +((TableValue)anotherTableValue).getDoubleValue()!=null &&
                               this.getDoubleValue()!=null);
                     Double anotherDouble=((TableValue)anotherTableValue).getDoubleValue();
                     return this.dValue.compareTo(anotherDouble);
                //compareTo for two Strings
                if(((TableValue)anotherTableValue).getStringValue()!=null &&
                          this.getStringValue()!=null){
                     String anotherString=((TableValue)anotherTableValue).getStringValue();
                     return this.sValue.compareTo(anotherString);
                //sort Strings before Doubles
                if(((TableValue)anotherTableValue).getStringValue()!=null &&
                          this.getStringValue()==null){
                     return 1;
                //sort Strings before Doubles
                return -1;
           public String toString(){
                if(dValue==null){
                     return sValue;
                return dValue.toString();
    }

  • Problems creating session ejbs in a startup class

    public class startupTest implements T3StartupDef
         private T3ServicesDef services;
         public startupTest()
         public String startup(String name, Hashtable args) throws Exception
         try{
              Context initialContext = getContext("t3://localhost:7001");
         DruckAuftragHome dah =     (DruckAuftragHome)initialContext.lookup(
    "DruckAuftrag" );
              javax.ejb.EJBObject o = dah.create();
              DruckAuftrag da = (DruckAuftrag) o;
              System.out.println("EEEEEEEEEEEEEEEEEEEEEEEE"+da.makePDF());
              catch(Exception e)
                   e.printStackTrace();
              return "";
    private static Context getContext(String wlUrl)
    throws javax.naming.NamingException
    Hashtable env = new Hashtable();
    env.put(Context.PROVIDER_URL, wlUrl);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    weblogic.jndi.WLInitialContextFactory.class.getName());
    Context ctx = new InitialContext(env);
    return ctx;
         public void setServices(T3ServicesDef services)
              this.services = services;
    Calling the Bean Method works form Servlets and form standalone Clients, but at
    startup
    java.lang.NullPointerException
    at weblogic.utils.io.UnsyncByteArrayInputStream.<init>(UnsyncByteArrayInputStream.java:57)
    at weblogic.rmi.internal.ServerRequest.getInputStream(ServerRequest.java:91)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:87)
    at com.bmw.tais.appserver.ipa.produkt.druckauftrag.DruckAuftragBeanHomeImpl_WLStub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    at com.bmw.tais.helper.startupTest.startup(C:/ipa_wa/IPA/com/bmw/tais/helper/startupTest.java:49)
    at weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:146)
    at weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    if i call the bean in a tread over and over again the first exception is a nullpointer
    (shown above) and then i get a ClassCastException calling
    the create Methode on the DruckAuftragBeanHomeImpl_WLStub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    any ideas?
    thanks
    regars robert

    Hi Robert,
    You need to let the server to warm up before
    starting using it's services. Check weblogic doc's
    for samples.
    Regards,
    Slava Imeshev
    "robert neumaier" <[email protected]> wrote in message
    news:[email protected]...
    >
    public class startupTest implements T3StartupDef
    private T3ServicesDef services;
    public startupTest()
    public String startup(String name, Hashtable args) throws Exception
    try{
    Context initialContext = getContext("t3://localhost:7001");
    DruckAuftragHome dah =(DruckAuftragHome)initialContext.lookup(
    "DruckAuftrag" );
    javax.ejb.EJBObject o = dah.create();
    DruckAuftrag da = (DruckAuftrag) o;
    System.out.println("EEEEEEEEEEEEEEEEEEEEEEEE"+da.makePDF());
    catch(Exception e)
    e.printStackTrace();
    return "";
    private static Context getContext(String wlUrl)
    throws javax.naming.NamingException
    Hashtable env = new Hashtable();
    env.put(Context.PROVIDER_URL, wlUrl);
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    weblogic.jndi.WLInitialContextFactory.class.getName());
    Context ctx = new InitialContext(env);
    return ctx;
    public void setServices(T3ServicesDef services)
    this.services = services;
    Calling the Bean Method works form Servlets and form standalone Clients,but at
    startup
    java.lang.NullPointerException
    atweblogic.utils.io.UnsyncByteArrayInputStream.<init>(UnsyncByteArrayInputStre
    am.java:57)
    atweblogic.rmi.internal.ServerRequest.getInputStream(ServerRequest.java:91)
    atweblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:87)
    atcom.bmw.tais.appserver.ipa.produkt.druckauftrag.DruckAuftragBeanHomeImpl_WLS
    tub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    atcom.bmw.tais.helper.startupTest.startup(C:/ipa_wa/IPA/com/bmw/tais/helper/st
    artupTest.java:49)
    atweblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:146)
    atweblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java:62)
    >
    if i call the bean in a tread over and over again the first exception is anullpointer
    (shown above) and then i get a ClassCastException calling
    the create Methode on theDruckAuftragBeanHomeImpl_WLStub.create(DruckAuftragBeanHomeIm
    pl_WLStub.java:151)
    any ideas?
    thanks
    regars robert

  • Soap handler to process header before policy authentication

    I have a web service secured with WSSE Security. One of the web service client is using a custom security header instead of the standard WSSE Security header, so my web service fails authenticating the request. Can I write a soap handler to intercept the header before policy authentication, and modify the header to add the WSSE Security header so it can be authenticated?

    Hi Mike,
    Thank you for your response. Yes, I was trying to cast the elements returned from
    examineHeaderElements to SOAPHeaderElement. This was throwing a ClassCastException.
    Now, I am using
    soapHeader.getChildElements(nodeName)
    This seems to work fine. Where I created the nodeName through SOAPEnvelope's createNode()
    method. Don't know what the original problem was. But, now I avoided using that
    API. Will let you know if I get any more information.
    Regards,
    Adam
    "Michael Wooten" <[email protected]> wrote:
    >
    Hi Adam,
    The java.util.Iterator returned from the examineHeaderElements() method,
    should
    contain javax.xml.soap.SOAPHeaderElement objects. Is that what you are
    trying
    to cast to?
    Regards,
    Mike Wooten
    "Adam Athimuthu" <[email protected]> wrote:
    Hello,
    I am getting a ClassCastException when trying to process the SOAPHeader
    in a SOAP
    handler. I tried the following...inside the handleRequest(MessageContext
    context)
    method:
    SOAPPart soapPart=null;
    SOAPEnvelope soapEnvelope=null;
    SOAPHeader soapHeader=null;
    SOAPMessageContext soapContext=(SOAPMessageContext) context;
    System.out.println("handleRequest");
    SOAPMessage soapMessage=soapContext.getMessage();
    System.out.println("SOAPMessage: "+soapMessage.toString());
    try
    soapPart=soapMessage.getSOAPPart();
    soapEnvelope=soapPart.getEnvelope();
    soapHeader=soapEnvelope.getHeader();
    System.out.println("SOAPHeader: "+soapHeader.toString());
    soapHeader.addTextNode("CustomNode");
    Iterator allHeaders=soapHeader.examineHeaderElements("http://someuri.com");
    The examineHeaderElements throws a ClassCastException, no matter what
    method gets
    invoked on the soapHeader object. I tried casting this to the weblogic.webservice.core....
    implemented objects. The result is the same.
    I appreciate any help.
    Thanks,
    Adam
    Athi D. Athimuthu

  • Casting webservice Objects

    I've got a question about Webservices in Flex. When using the 'Import Web Service'-command, Flex automatically creates the appropiates Classes and Connection scripts. When using these scripts, Flex automatically casts Objects received by a Webservice to a Strong-typed Class, and not a ObjectProxy. This is very handy. The only downside of this features is that you'd have to recreate all the files when you change a property in your webservice. Because I had to make manual changes in the generated files, everytime I make a change in my Webservice, I have to update all these files again. Therefor I would like to make my own connectionscripts, so when my webservice changes, I only have to make this change in my Flex-classes. Problem is I couldn't find any scripts that correctly connects to a Webservice, AND casts my objects to a Strong-typed class. Everytime I try to cast a received ObjectProxy to a certain Class, I get null returned. I've tried several things, including the SoapDecoder, and the SchemaRegister, but I somehow can't get it to work.
    Does anybody has an example of a script that does this job or know how to get this done?
    Thanx,
    Paul

    Hi Mike,
    Thank you for your response. Yes, I was trying to cast the elements returned from
    examineHeaderElements to SOAPHeaderElement. This was throwing a ClassCastException.
    Now, I am using
    soapHeader.getChildElements(nodeName)
    This seems to work fine. Where I created the nodeName through SOAPEnvelope's createNode()
    method. Don't know what the original problem was. But, now I avoided using that
    API. Will let you know if I get any more information.
    Regards,
    Adam
    "Michael Wooten" <[email protected]> wrote:
    >
    Hi Adam,
    The java.util.Iterator returned from the examineHeaderElements() method,
    should
    contain javax.xml.soap.SOAPHeaderElement objects. Is that what you are
    trying
    to cast to?
    Regards,
    Mike Wooten
    "Adam Athimuthu" <[email protected]> wrote:
    Hello,
    I am getting a ClassCastException when trying to process the SOAPHeader
    in a SOAP
    handler. I tried the following...inside the handleRequest(MessageContext
    context)
    method:
    SOAPPart soapPart=null;
    SOAPEnvelope soapEnvelope=null;
    SOAPHeader soapHeader=null;
    SOAPMessageContext soapContext=(SOAPMessageContext) context;
    System.out.println("handleRequest");
    SOAPMessage soapMessage=soapContext.getMessage();
    System.out.println("SOAPMessage: "+soapMessage.toString());
    try
    soapPart=soapMessage.getSOAPPart();
    soapEnvelope=soapPart.getEnvelope();
    soapHeader=soapEnvelope.getHeader();
    System.out.println("SOAPHeader: "+soapHeader.toString());
    soapHeader.addTextNode("CustomNode");
    Iterator allHeaders=soapHeader.examineHeaderElements("http://someuri.com");
    The examineHeaderElements throws a ClassCastException, no matter what
    method gets
    invoked on the soapHeader object. I tried casting this to the weblogic.webservice.core....
    implemented objects. The result is the same.
    I appreciate any help.
    Thanks,
    Adam
    Athi D. Athimuthu

  • Problem running Object Value Selector

    Hi,
    We have implemented OVS for GetFlightList BAPI. We are able to get the data on the OVS selector. But once we click on a particular record of the table, the value is not passed to the base control and we get <b>ClassCastException</b> in applyResult() method of the listener.
    The code is pasted below.
    public void applyResult(IWDNodeElement applicationNodeElement,
         IWDNodeElement queryOutputNodeElement) {
    try
    <b>IPrivateOVS_testView.IFlight_dataElement ovsCallerNodeElement =(IPrivateOVS_testView.     IFlight_dataElement) applicationNodeElement;</b>
    The exception thows on this line of the code.
    Any help?
    regards,
    Deepika

    I am still getting the same Exception.I am explaning the scenerio:
    I created a set of Flight_data attributes in the custom controller and mapped to a similar set in the view controller to fix the error.The listener is implemented in the Custom controller.On selecting a row from the OVS table i get the CastClass Exception in the applyResult()method of the listener at the following point of code:
    <b>IPublicTestOVS_Custom.IFlight_dataElement ovsCallerNodeElement =
         (IPublicTestOVS_Custom.IFlight_dataElement)
         applicationNodeElement;</b>
    The exception is given below:
    <i>java.lang.ClassCastException
        at com.sap.training.ovs.cust.TestOVS_Custom$OVSDemoContextNotificationListener.applyResult(TestOVS_Custom.java:235)
        at com.sap.tc.webdynpro.progmodel.valuehelp.OVSCMIQuery.applyResult(OVSCMIQuery.java:143)
        at com.sap.tc.webdynpro.components.ovs.ResultView.onActionLeadSelected(ResultView.java:195)
        at com.sap.tc.webdynpro.components.ovs.wdp.InternalResultView.wdInvokeEventHandler(InternalResultView.java:149)</i>

  • TreeCellRenderer in Linux

    Hi!
    I'm trying to get my swing app to work in both Windows and Linux. Right now, it works in Windows, but in Linux (Mandrake) it returns a ClassCastException in the getTreeCellRendererComponent() method in my custom TreeCellRenderer. My app shows a filesystem tree.
         public Component getTreeCellRendererComponent(
             JTree tree,
             Object value,
             boolean selected,
             boolean expanded,
             boolean leaf,
             int row,
             boolean hasFocus) {
                   String name=fsv.getSystemDisplayName(((FileNode)value).getFile());  // CLASSCASTEXCEPTION HERE
                   super.getTreeCellRendererComponent(tree, name, selected, expanded, leaf, row, hasFocus);
                   setText(name);
                   setIcon(fsv.getSystemIcon(((FileNode)value).getFile()));
                   return this;
         }I don't know why the FileNode class cast throws a ClassCastException in Linux but not in Windows. Here is the code for the FileNode class:
    public class FileNode extends DefaultMutableTreeNode {
         private FileSystemView fsv=FileSystemView.getFileSystemView();               
         public FileNode(String name) {
              setUserObject(new File(name));
         public FileNode(File file) {
            setUserObject(file);
         public boolean getAllowsChildren() {
                 return isDirectory();
         public boolean isLeaf() {
                 return !isDirectory();
         public File getFile() {
                 return (File)getUserObject();
         public boolean isDirectory() {
              File file = getFile();
              return fsv.isTraversable(file).booleanValue();
    }Can anyone help me, please ? Is FileSystemView broken in Linux ? I'm using 1.4.2 in both Windows (the full JSDK) and Linux (the JRE).
    leemon

    You do know the difference between "new topic" and "reply", do you?

Maybe you are looking for

  • Error GRC Access Control 10.0

    We have a problem when execute the next steps in GRC Access Control 10.0 SPRO-->Governance, Risk and Compliance>Access Control--> Access Risk Analysis--> Batch RisK Analysis We applied the next note, but problem is the same. 1563583 - SYSTEM_NO_TASK_

  • How to update need by date in Purchase order using an API?

    Hi All, Is there any API available in 11i which can be used to update the need by date in purchase order? There is a API PO_CHANGE_API1_S.UPDATE_PO, but it updates only the promise date and not the need by date. Please help !! Thanks & Regards Anuj

  • Enquiry Quatation Scenario

    Hi all, Scenario starts with a formal enquiry from customer in a predefined format which will be punched in the system. 1>Enquiry acceptance to be done. 2>Checks to be built where quotation cannot be sent without the formal process of feasibility, 3>

  • New Universe Connection not taking effect

    Hi, We are using Business Objects XI 3.1 running on Windows 2008 32-bit SP1. The BI Database is hosted on a Redhat Linux Box running Oracle 11gR1 64-bit. Recently one of my user passwords expired on the Oracle BI Database, and I was forced to change

  • If you have iPhone4 and can you take out the sim card from iPhone4 and transfer it in to new iPhone4s?

    if you have iPhone4 and can you take out the sim card from iPhone4 and transfer it in to new iPhone4s?