Topic
4 replies Latest Post - ‏2010-05-11T07:21:22Z by Santosh190281
Santosh190281
Santosh190281
3 Posts
ACCEPTED ANSWER

Pinned topic ClassCastException ISRA 3.4

‏2010-05-07T10:28:00Z |
Friends help me out i am new to using ISRA API, getting the Classcastexception when trying to fetch the connection

Error Message :
java.lang.ClassCastException: com.filenet.is.ra.cci.FN_IS_CciConnectionSpec cannot be cast to com.filenet.is.ra.cci.FN_IS_CciConnectionSpec
15:56:38,008 ERROR STDERR at com.filenet.is.ra.cci.FN_IS_CciConnectionFactory.getConnection(Unknown Source)
15:56:38,008 ERROR STDERR at com.isra.util.GetConnection.getConnection(GetConnection.java:60)
15:56:38,008 ERROR STDERR at org.apache.jsp.index_jsp._jspService(index_jsp.java:89)
15:56:38,008 ERROR STDERR at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
15:56:38,008 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
15:56:38,008 ERROR STDERR at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:387)
15:56:38,008 ERROR STDERR at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
15:56:38,008 ERROR STDERR at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
15:56:38,008 ERROR STDERR at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:56:38,008 ERROR STDERR at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
15:56:38,008 ERROR STDERR at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
15:56:38,008 ERROR STDERR at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
15:56:38,008 ERROR STDERR at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
15:56:38,008 ERROR STDERR at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
15:56:38,008 ERROR STDERR at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
15:56:38,008 ERROR STDERR at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
15:56:38,008 ERROR STDERR at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
15:56:38,008 ERROR STDERR at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
15:56:38,008 ERROR STDERR at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
Source File:
package com.isra.util;

import java.io.Serializable;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.resource.cci.Connection;
import javax.resource.cci.ConnectionFactory;
import javax.resource.cci.ResourceAdapterMetaData;

import com.filenet.is.ra.cci.FN_IS_CciConnectionSpec;

public class GetConnection implements Serializable {

/**
*
*/
private static final long serialVersionUID = 5526504198315645792L;

private String jndiName = "java:ISCF";

private Context m_ctxt = null;

private transient ConnectionFactory m_connFactory = null;

private transient FN_IS_CciConnectionSpec m_connSpecification = null;

private transient Connection m_conn = null;

public Connection getConnection(String userName, String passWord){
/**
* TODO: try with reflection
*
*/
try {

m_ctxt = new InitialContext();
m_connFactory = (ConnectionFactory)m_ctxt.lookup(jndiName);

System.out.println("ConnectionFactory : "+m_connFactory);

System.out.println("Retrieving Connection with Credentials: ");
System.out.println("UserId : "+userName);

ResourceAdapterMetaData raMetaData = m_connFactory.getMetaData();
String m_RAVersion = raMetaData.getAdapterVersion().toUpperCase();

System.out.println("Resource Adapter version : "+m_RAVersion);

m_connSpecification = new FN_IS_CciConnectionSpec();
m_connSpecification.setUserName(userName);
m_connSpecification.setPassword(passWord);

m_conn = m_connFactory.getConnection(m_connSpecification);

} catch (Exception e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}

System.out.println("FileNet Connection Object :"+m_conn);

return m_conn;
}
}
Please help its bit urgent thanks in advance
Updated on 2010-05-11T07:21:22Z at 2010-05-11T07:21:22Z by Santosh190281
  • SystemAdmin
    SystemAdmin
    254 Posts
    ACCEPTED ANSWER

    Re: ClassCastException ISRA 3.4

    ‏2010-05-07T14:19:23Z  in response to Santosh190281
    Hi,

    This is not the right forum for this question, however I couldn't find the right forum to post to. You should probably open a PMR about this issue with the ISRA group.

    Thanks,
    Jeremy
    • Santosh190281
      Santosh190281
      3 Posts
      ACCEPTED ANSWER

      Re: ClassCastException ISRA 3.4

      ‏2010-05-08T09:04:08Z  in response to SystemAdmin
      Jeremy thanks for the response, btw what is PMR?? :-(
      • SystemAdmin
        SystemAdmin
        254 Posts
        ACCEPTED ANSWER

        Re: ClassCastException ISRA 3.4

        ‏2010-05-10T15:06:36Z  in response to Santosh190281
        A PMR is like a support ticket. You should contact IBM Support about your problem.
        • Santosh190281
          Santosh190281
          3 Posts
          ACCEPTED ANSWER

          Re: ClassCastException ISRA 3.4

          ‏2010-05-11T07:21:22Z  in response to SystemAdmin
          The issue has been resolved when application is deployed as ear rather than war, its a problem with classloader in jboss