Solution needed  for java.lang.ClassCastException

My code+_
public class EmployeeResultsCO extends OAControllerImpl
public static final String RCS_ID="$Header$";
public static final boolean RCS_ID_RECORDED =
VersionInfo.recordClassVersion(RCS_ID, "%packagename%");
* Layout and page setup logic for a region.
* @param pageContext the current OA page context
* @param webBean the web bean corresponding to the region
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
super.processRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"empCreateTxn", false))
am.invokeMethod("rollbackEmployee");
TransactionUnitHelper.endTransactionUnit(pageContext, "empCreateTxn");
// This controller is associated with the table.
OATableBean table = (OATableBean)webBean;
table.prepareForRendering(pageContext);
DataObjectList columnFormats = (DataObjectList)table.getColumnFormats();
DictionaryData columnFormat = null;
int childIndex = pageContext.findChildIndex(table, "DeleteSwitcher");
columnFormat =(DictionaryData)columnFormats.getItem(childIndex);
columnFormat.put(COLUMN_DATA_FORMAT_KEY, ICON_BUTTON_FORMAT);
// Implement the bound value for the Status Image
OAImageBean statusImageBean =
(OAImageBean)table.findIndexedChildRecursive("EmpStatus");
if (statusImageBean == null)
MessageToken[] tokens = { new MessageToken("OBJECT_NAME",
"EmpStatus") };
throw new OAException("AK", "FWK_TBX_OBJECT_NOT_FOUND", tokens);
// Define the OA Framework image directory
FixedBoundValue imageDirectory =
new FixedBoundValue(APPS_MEDIA_DIRECTORY);
// Define a binding between the image bean and the view object attribute
// that it will reference to get the appropriate .gif image value name.
// Note that the corresponding attribute values are obtained using a
// decode() in the EmployeeSummaryVO view object.
OADataBoundValueViewObject statusBinding = new OADataBoundValueViewObject
(statusImageBean, "EmployeeStatus");
// Concatenate the image directory with the actual image name (as retrieved
// from the view object attribute decode() statement)
ConcatBoundValue statusCBV = new ConcatBoundValue(new BoundValue[]
{imageDirectory, statusBinding});
// Tell the image bean where to get the image source attribute
statusImageBean.setAttributeValue(SOURCE_ATTR, statusCBV);
// For accessibility compliance, you always specify the alternate text for an
// image. Note that you should never use static text as shown (always source
// translatable text from Message Dictionary when setting display text values
// programmatically), and ideally, the alternate text should in this case
// should clearly indicate the status the image represents.
// Generally, we would recommend that you use a Switcher as shown for the
// Delete column to easily show different images with associated alternate
// text, but we wanted to show how to use a bound value also in this lab.
statusImageBean.setAttributeValue(SHORT_DESC_ATTR, "Employee status indicator");
Error
oracle.apps.fnd.framework.OAException: java.lang.ClassCastException
     at oracle.apps.fnd.framework.OAException.wrapperException(OAException.java:891)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:597)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
     at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
     at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
     at OA.jspService(OA.jsp:40)
     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
     at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
     at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
     at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
     at OA.jspService(OA.jsp:45)
     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
     at java.lang.Thread.run(Thread.java:534)
## Detail 0 ##
java.lang.ClassCastException
     at kumarkris.oracle.apps.ak.employee.webui.EmployeeResultsCO.processRequest(EmployeeResultsCO.java:59)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
     at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
     at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
     at OA.jspService(OA.jsp:40)
     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
     at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
     at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
     at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
     at OA.jspService(OA.jsp:45)
     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
     at java.lang.Thread.run(Thread.java:534)
java.lang.ClassCastException
     at kumarkris.oracle.apps.ak.employee.webui.EmployeeResultsCO.processRequest(EmployeeResultsCO.java:59)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:581)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.OAPageLayoutHelper.processRequest(OAPageLayoutHelper.java:1133)
     at oracle.apps.fnd.framework.webui.beans.layout.OAPageLayoutBean.processRequest(OAPageLayoutBean.java:1569)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.beans.form.OAFormBean.processRequest(OAFormBean.java:385)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:937)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequestChildren(OAWebBeanHelper.java:904)
     at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processRequest(OAWebBeanHelper.java:640)
     at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processRequest(OAWebBeanContainerHelper.java:247)
     at oracle.apps.fnd.framework.webui.beans.OABodyBean.processRequest(OABodyBean.java:353)
     at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2318)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1717)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:502)
     at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:423)
     at OA.jspService(OA.jsp:40)
     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
     at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:209)
     at com.evermind.server.http.GetParametersRequestDispatcher.forward(GetParametersRequestDispatcher.java:189)
     at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:199)
     at OA.jspService(OA.jsp:45)
     at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
     at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317)
     at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465)
     at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379)
     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
     at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727)
     at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306)
     at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259)
     at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106)
     at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
     at java.lang.Thread.run(Thread.java:534)

## Detail 0 ##
java.lang.ClassCastException
at kumarkris.oracle.apps.ak.employee.webui.EmployeeResultsCO.processRequest(EmployeeResultsCO.java:59)What is the code at line no. 59 ?
-Anand

Similar Messages

  • Java.lang.ClassCastException caught for JMXServiceURL

    Hi,
    I have a jonas server running
    I checked that the carol.jrmp.url=rmi://localhost:1181 in carol.properties file
    I try to establish connection with this server using the following codes
    try {
    JMXServiceURL url =new JMXServiceURL("service:jmx:rmi:///jndi/rmi://localhost:1181");
    JMXConnector jmxc = JMXConnectorFactory.connect(url, null);
    } catch (Exception e) {
    System.err.println("Exception caught:" + e);
    but it returns an java.lang.ClassCastException.
    How do I resolve this?
    Thanks

    hi
    Sorry...
    The stacktrace shown to me is as follows:
    java.lang.ClassCastException
         at javax.management.remote.rmi.RMIConnector.narrowJRMPServer(RMIConnector.java:1796)
         at javax.management.remote.rmi.RMIConnector.findRMIServerJNDI(RMIConnector.java:1791)
         at javax.management.remote.rmi.RMIConnector.findRMIServer(RMIConnector.java:1751)
         at javax.management.remote.rmi.RMIConnector.connect(RMIConnector.java:259)
         at javax.management.remote.JMXConnectorFactory.connect(JMXConnectorFactory.java:247)
         at connection.jonas.Client.main(Client.java:47)
    Exception in thread "main"

  • Java.lang.ClassCastException: Cannot narrow remote object weblogic.rmi.inte

    Hi,
    I am trying to deploy ejb3.0 on weblogic 10 server. I am able to find the JNDI name of the stateless session bean correctly, but getting an exception while narrowing it down. My ejb3.0 client is a standalone java client. I am trying to access the stateless session ejb3.0 bean.Please help me. i have been trying it for many days.
    thanks in advance,
    Sanjeev
    [sanpraka@localhost certEjb]$ java -cp ./:/usr/weblogic/bea/wlserver_10.0/server/lib/weblogic.jar:/usr/weblogic/bea/wlserver_10.0/server/lib/wlclient.jar com.titan.clients.Client
    Object is weblogic.rmi.internal.BasicRemoteRef - hostID: '5337880647112897730S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:wl_server:examplesServer', oid: '302', channel: 'null'
    java.lang.ClassCastException: Cannot narrow remote object weblogic.rmi.internal.BasicRemoteRef - hostID: '5337880647112897730S:127.0.0.1:[7001,7001,-1,-1,-1,-1,-1]:wl_server:examplesServer', oid: '302', channel: 'null' to com.titan.travelagent.TravelAgentRemote
    at weblogic.corba.server.naming.ReferenceHelperImpl.narrow(ReferenceHelperImpl.java:206)
    at weblogic.rmi.extensions.PortableRemoteObject.narrow(PortableRemoteObject.java:88)
    at weblogic.iiop.PortableRemoteObjectDelegateImpl.narrow(PortableRemoteObjectDelegateImpl.java:32)
    at javax.rmi.PortableRemoteObject.narrow(Unknown Source)
    at com.titan.clients.Client.main(Client.java:24)
    [sanpraka@localhost certEjb]$

    We have a similar problem. We have a web application (on server A) that invokes an EJB on a remote server (server B). This works fine, until we deploy another web application to server A at which point the existing web application starts to throw java.lang.ClassCastException when narrowing the remote EJB interface. The exception starts to be thrown at the moment the latter web application is deployed - start is not required.
    The latter web application contains (actually in APP-INF/lib) the old version of the EJB remote interface, that somehow gets to be loaded into the classpath of the existing web application. The solution is to delete the old version of the EJB remote interface from APP-INF/lib of the latter web application (we didn't need it anyway), but it would be interesting to know in which circumstances classes can get mixed between enterprise applications.
    I failed to reproduce the error in simple scenario, so this does not happen always.

  • Java.lang.ClassCastException while creating array descriptor

    ( This post was moved from SQL / PLSQL forum to here )
    Hi everyone, i used to pass string array from java to plsql. I wrote a java source, then i load db with loadjava. And i wrote java spec. Then i run the function but i am getting this error :
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    My Java Source is :
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import javax.naming.Context;
    import javax.naming.InitialContext;
    import javax.sql.DataSource;
    import oracle.sql.*;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleDriver;
    public class SplitterOracle3 {
    public static oracle.sql.ARRAY tokens2(String str,String delim)
    try
    //Class.forName("oracle.jdbc.driver.OracleDriver");
    //DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    //Connection conn = new OracleDriver().defaultConnection( );
    OracleDriver ora = new OracleDriver();
    OracleConnection conn = (OracleConnection) ora.defaultConnection();
    //ArrayDescriptor arrayDesc = ArrayDescriptor.createDescriptor("MY_ARRAY", ((conn).getRealConnection());
    //Connection conn = DriverManager.getConnection("jdbc:default:connection:");
    //Connection conn = ((DelegatingConnection) getDataSource().getConnection()).getInnermostDelegate();
    // get an initial context
    //OracleConnection oracleConnection = (OracleConnection)WSJdbcUtil.getNativeConnection((WSJdbcConnection) wsConn);
    ArrayDescriptor arraydesc =
    ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);
    String strarr[] = new String[47];
    strarr[0]="ahmet";
    strarr[1]="mehmet";
    int curIndex = 0;
    int nextIndex = 0;
    boolean nextIsLastToken = false;
    int i=0;
    while (true)
    nextIndex = str.indexOf(delim, curIndex);
    if (nextIsLastToken)
    //return false;
    break;
    if (nextIndex == -1)
    nextIsLastToken=true;
    nextIndex = str.length();
    strarr[i] = str.substring(curIndex, nextIndex);
    curIndex = nextIndex + 1;
    i++;
    ARRAY dirArray = new ARRAY(arraydesc, conn, strarr);
    return dirArray;*/
    catch(Exception ex)
    System.err.println(ex.getMessage());
    ex.printStackTrace();
    return null;
    public static void main(String[] args)
    String str="2000,2,123553168,1,10,64895,65535,27662,64860,64895,65535,27662,64860,0,,,,,,0,0,2491039806,,,,,,,,,0,0,1,,2491039106,,,,,,,,,,,,";
    String strarr[] = new String[47];
    long l1,l2;
    int j=0;
    l1 = System.currentTimeMillis();
    for ( int i=0; i<20000000; i++)
    strarr = tokens2(str,",");
    l2 = System.currentTimeMillis();
    System.out.println("Fark :"+ (l2-l1));
    The line has "ArrayDescriptor.createDescriptor ("ARR_VARCHAR_100", conn);" causes this error.
    java.lang.ClassCastException
    at oracle.jdbc.driver.PhysicalConnection.putDescriptor(PhysicalConnection.java:4921)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:208)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:175)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:158)
    at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:125)
    at SplitterOracle3.tokens2(SplitterOracle3.java:29)
    But i could not find the solution. Can you help me?
    Thanks for responses.

    Hi,
    Did you try my suggestion from Re: java.lang.ClassCastException while create array descriptor
    Try replacing
    oracle.jdbc.driver.OracleConnectionwith
    oracle.jdbc.OracleConnectionRegards
    Peter

  • Struts Application java.lang.ClassCastException

    We have deployed struts1.2.1 application on Oracle Application server 10g
    We are getting inconsistent error java.lang.ClassCastException pointing to struts html:form tag once the server restarts the exception is removed this is happening at runtime.
    Since this is a production issue its very critical .If any one has faced similar issue Please provide the solution.

    Take a look at the stack trace, it shows you exactly where the error is coming from:
    java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
    org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)Line 41 in your CandidateListAction.
    Probably it is failing on a cast of your action form.
    Taking a closer look at your struts-config, you are "chaining" actions.
    Your AddCandidateAction uses the candidateForm, and forwards to CandidateListAction.do
    Your CandidateListAction uses the searchForm.
    That will be the cause of your class cast exception.
    <action path="/Add"
      name="candidateForm"
      type="org.theclass.candidate.view.AddCandidateAction"
      validate ="true"
      input="/jsp/addcandidate.jsp">
      <forward name="success" path="/CandidateList.do"/>
    </action>
    <action path="/CandidateList"
    type="org.theclass.candidate.view.CandidateListAction"
    name="searchForm"
    scope="request" >
    <forward name="failure" path="/jsp/list.jsp"/>
    <forward name="success" path="/jsp/candidatelist.jsp"/>
    </action>Check out: http://struts.apache.org/1.x/faqs/newbie.html#chaining
    Solutions?
    - don't chain actions ;-)
    - use the same action form for both actions (possible?)
    - make the actionForward a "redirect" one. That means a new request, and losing any request parameters/attributes but should prevent this class cast exception.
    Hope this helps,
    evnafets

  • Java.lang.ClassCastException when trying to retrive a jdbc/OracleDS

    Hello friends, I'm experiencing a rare problem, "java.lang.ClassCastException" when trying to retrive the jdbc/OracleDS datasource using JNDI lookup, the exception is there, either, when running in the embebed OC4J from JDev 10.1.3.3 or when deploying (the War) to my OracleIAS (10.1.2). Actualy we are programing the DataSource and changing the URL each time we update the application (in both environment: Developer and Production), it is just a temporary "work around" while we find the real solution.
    We can't Cast a Oracle Object (oracle.jdbc.pool.OracleDataSource) to the java DataSource. Why?
    Here you have the story:
    The application wa started in Eclipse 3.2 with Tomcat 5, and we are using Struts 1.1 and Hibernate 3, in this environment we don't have problems. the problem happens during deploying the application to our Orace AS 10g (10.1.2). When googling for solution we found related problems in some forums, so we tried all the solutions explained in that post, including this. Finaly, we failed to find the solution.
    After that, we migrate the application to JDeveloper 10.1.3.3, and then try the JNDI lookup and the problem STAY, then we did everything again into JDev:
    - Changed the default jdk from 1.5 to 1.4.2_06, for the projects, the embebed OC4J and the Java Compiler....
    - Configuring the DataSource manualy in the xml.
    - Testing with several jdk version, trying on embebed oc4j, standalone oc4j, Oracle IAS, and so on.
    - We have tried everything we found in the posts.
    But .... the problem still :'(.
    We have found that some guys have solved the problems with the change of the jdk and other small stuff, but all that were not enough for us.
    Have somebody found other solution for this problem or we have some alien problem here?.
    Thanks in advance.

    Fer Domin, thanks by your replay.
    The answer for your question is, YES. We have tried with several DataSource types in the Oracle side (app server,embebed oc4j, standalone oc4j) and the app side (java). Also, all jdbc datasource extend the javax.sql.DataSource .. so it's rare to have this error when doing a simple jndi lookup.
    We tried deploying a small app (from Oracle) to test the DataSource in the app server (10.1.2.0.2) and it was working well. But we don't know which jdk was used to package that ear/war (I mean the TestDS small app).
    So, everything look like we are having a jdk compatibility problem ... but we don't know which it's or where it's.... because we configure JDeveloper 10.1.3.3 to use the same jdk, even for compiling and running the embebed oc4j and the problem still.
    Thanks again.

  • Java.lang.ClassCastException when calling webservice stub  from oracle DB

    Hello everyone,
    Because i need to get familliar with calling java webservices from an oracle database, i followed the following example
    (http://www.oracle.com/technology/products/jdev/howtos/10g/WS_DBCallout/DBCalloutWS_HowTo.htm),
    which included installing the SOAP client stack to the database (in the sys schema), grant the right permissions to the SYS user, developing a simple Helloworld webservice with jdeveloper 10.1.2, generating a Webservice stub and deploying a static method of this stub to the database.
    All of this worked just fine, but when i want to call the webservice from oracle by invoking the deployed function, i get a java.lang.ClassCastException.
    The complete stacktrace lists as follows:
    v_Return = foutje: java.lang.ClassCastExceptionnulljava.lang.ClassCastException
         at org.apache.soap.rpc.RPCMessage.serializeParams(RPCMessage.java:323)
         at org.apache.soap.rpc.RPCMessage.marshall(RPCMessage.java:305)
         at org.apache.soap.Body.marshall(Body.java:148)
         at org.apache.soap.Envelope.marshall(Envelope.java:203)
         at org.apache.soap.Envelope.marshall(Envelope.java:161)
         at oracle.soap.transport.http.OracleSOAPHTTPConnection.send(OracleSOAPHTTPConnection.java:664)
         at org.apache.soap.rpc.Call.invoke(Call.java:261)
         at test.HelloWorldServiceStub.sayHello(HelloWorldServiceStub.java:82)
    I debugged the WebServiceStub and noticed that the call.invoke method crashes. This is weird beacuse when i use System.out.println on the parameter is works just fine. so you would think it is a string.
    Moreover, if i invoke the webservice from the endpoint or even when im debugging the stub locally it all works just fine.
    Can someone plzzzzzz help me with this because i spend the whole day looking for an answer and im getting crazy!!!!!
    Thanx al lot guys,
    Kim
    PS or could the problem be in the database instead of the webservice?????????
    Message was edited by:
    user568880
    Message was edited by:
    Kim Zeevaarders

    I think that it's going wrong because i did not install the right SOAP client stack.
    In the HowTo is specified what JAR files are to be loaded in the database (from %JDEV_HOME), but it states that it has only been tested on a Oracle 9.2 database. I'm using Oracle10g. Maybe that's the reason that im getting this classcast exception...
    Can anybody tell me what the right .JAR files are that have to be loaded into database when working with Oracle 10g?
    Many thx in advance!
    Kim

  • Java.lang.ClassCastException when executing an AbstractAggregator

    I'm trying to run an agregator over a distributed cache and I'm getting this exception:
    (Wrapped: Failed request execution for NPDistributedCache service on Member(Id=2, Timestamp=2013-03-16 09:46:09.907, Address=127.0.0.1:8090, MachineId=27728, Location=site:,machine:proto1,process:716)) java.lang.ClassCastException: com.tangosol.util.extractor.ReflectionExtractor cannot be cast to com.tangosol.util.InvocableMap$EntryAggregator
            at com.tangosol.util.Base.ensureRuntimeException(Base.java:288)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.tagException(Grid.CDB:36)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.validateRequestForStorage(PartitionedCache.CDB:37)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onAggregateFilterRequest(PartitionedCache.CDB:16)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$AggregateFilterRequest.run(PartitionedCache.CDB:1)
            at com.tangosol.coherence.component.net.message.requestMessage.DistributedCacheRequest.onReceived(DistributedCacheRequest.CDB:12)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onMessage(Grid.CDB:34)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:33)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.PartitionedService.onNotify(PartitionedService.CDB:3)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache.onNotify(PartitionedCache.CDB:3)
            at com.tangosol.coherence.component.util.Daemon.run(Daemon.CDB:42)
            at java.lang.Thread.run(Thread.java:662)
    Caused by: java.lang.ClassCastException: com.tangosol.util.extractor.ReflectionExtractor cannot be cast to com.tangosol.util.InvocableMap$EntryAggregator
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.grid.partitionedService.PartitionedCache$AggregateFilterRequest.read(PartitionedCache.CDB:7)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.deserializeMessage(Grid.CDB:19)
            at com.tangosol.coherence.component.util.daemon.queueProcessor.service.Grid.onNotify(Grid.CDB:31)
            ... 4 moreThe agregator extends from the AbstractAgregator class and I'm using an IdentityExtractor. Here is a piece of code of the agregator:
    public class MyAggregator extends AbstractAggregator {
        public MyAggregator() {
            // IdentityExtractor because I want the stored entry
            super(IdentityExtractor.INSTANCE);
        protected Object finalizeResult(boolean isFinal) {
            // Simple aggregation operation, with no interaction with the coherence env
        protected void init(boolean isFinal) {
         // Initialize aggregators vars   
        protected void process(Object value, boolean isFinal) {
            // Here we might access named caches using the cache factory to get entries related to the current one
            // i.e. If we are processing a product entry, we will go get from another cache the 'owner' (company entry)
    }To execute the aggregator, I'm using the InvocableMap.aggregate() method from the NamedCache get from the CacheFactory.getCache(). As filter, I'm using a simple EqualsFilter("getClass", type).
    All the caches that are used by this aggregator are cofigured using this schema (even those that are get within the process() method)
    <near-scheme>
         <scheme-name>np-near</scheme-name>
         <front-scheme>
              <local-scheme/>
         </front-scheme>
         <back-scheme>
              <distributed-scheme>
                   <scheme-name>np-distributed</scheme-name>
                   <service-name>NPDistributedCache</service-name>
                   <backup-count>2</backup-count>
                   <backing-map-scheme>
                        <local-scheme>
                             <eviction-policy>LRU</eviction-policy>
                             <high-units>10000</high-units>
                        </local-scheme>
                   </backing-map-scheme>
                   <autostart>true</autostart>
              </distributed-scheme>
         </back-scheme>
         <autostart>true</autostart>
    </near-scheme>
    Why coherence is trying to cast an extractor to an Aggregator? Which coherence component is using a ReflectionExtractor in my scenario? IMO, I'm using the InvocableMap API to execute a simple aggregator with an IdentityExtractor. Maybe getting others entries within the process() method are causing this? And if it is the case: how can I get others related entries within an aggregator? (I know the problem of getting entries within a Processor (for edition), but for agregation (for read only) this should be feasible right?
    Important info:
    * We are using Coherence 3.7 with the development license and the idea is to deploy the application in production with the standard licence
    * When there is only one single member in the cluster, the agregation works as expected.
    Edited by: ggarciao.com on Mar 16, 2013 11:59 AM
    Adding coherence version
    Edited by: ggarciao.com on Mar 16, 2013 2:48 PM

    Hi,
    At the end of your post you say that when there is only a single member in the cluster that it works as expected so this could suggest you have a serialization issue. Do you have the same serializer configured everywhere? If you are using POF is the POF configuration correct and are the serializiation methods in your extractor correct?
    Another point - it is not a good idea to access other caches using Cachefactory.getCache() from inside the aggregator's process method. This would cause re-entrant calls - i.e. calls from one worker thread in the cache service to another worker thread and can cause either thread starvation and in the worst case can cause your cluster to deadlock due to running out of worker threads.
    You say in the code comments that the caches you want to get are to get related data - if you use key association to co-locate related data in other caches in the same cache service onto the same partition then there are more reliable and safer ways to get related data directly from the backing maps.
    If you are going to go down the route of accessing other caches directly you need to be very careful about what services those other caches are in and what code you execute against those caches.
    JK

  • Crystal Reports 2013 java-error "java.lang.ClassCastException: class com.crystaldecisions..." when promoting

    Hi,
    when promoting "Crystal Report 2013" report (with data connectivity BW MDX Query) from BO DEV to BO PROD with BO Promotion Mgmt (LCM), we get the following error message in LCM jobs history:
    Resolution Status=Overwritten, Dependency Status=All the required dependencies are included.,
    Commit Status=Commit attempted and failed.,
    Promotion Status=Failure : Object promoted. Update failed.
    Error: java.lang.ClassCastException: class com.crystaldecisions.sdk.occa.report.lib.ByteArray:java.net.URLClassLoader@1d634758 incompatible
    with class com.crystaldecisions.sdk.occa.report.lib.PropertyBag:java.net.URLClassLoader@1d634758
    The report itself is present on BO PROD, but the overwrite (BW DEV MDX Query-> BW PROD MDX Query) is not applied, so report connectivity still points to the BW Query on the development system :-( .
    Moreover, the overwrite itself is detected when the job is "test promoted" ("active overwrite").
    Before, we successfully were able to transport crystal reports 2013 with overwrite (the connection then pointed to BW PROD). No idea yet what suddenly changed that...
    Any ideas what causes the error and what can fix it (no posts found, no SAP note, google also no hits)?
    Best regards
    Florian Pitschi

    Update:
    After more investigation, it looks as if the BO Server "CrystalReports2013ReportApplicationServer"
    from time to time has an issue - not only when promoting, but also when viewing publications that contain Crystal Report documents or when executing them, the java class error or similar issue is thrown.
    Did sb face similar behaviour and knows what is the root cause for "CrystalReports2013ReportApplicationServer" not working probably and throwing the java-class error? - it was running fine for several months, now, the class error showed up twice in one month.
    We need to find out what is causing the issue (aleady checked tomcat and BO-logfiles...).
    Best Regards
    Florian

  • BC4J/Struts java.lang.ClassCastException in UpdateAction

    Dear reader,
    I am facing a problem that I can't address. I have an entity object named 'Employee' and on the password field, there is one validation rule (a method, which checks if the passwords length is between 6 and 12 characters). I have a view called 'EmployeeView' for this entity.
    I have a jsp page, where a form can be used to update an Employee's data (using an update-action servlet). This all works fine if there is no validation rule on one of the fields (as is on password), as soon as the user fills in let's say a too short password, in UpdateAction this line causes an ClassCastException.
    oracle.jbo.html.struts11.actions.UpdateAction.execute(UpdateAction.java:85)
    The source-line it goes wrong:
    ApplicationConfig appConfig = (ApplicationConfig) request.getAttribute(Action.APPLICATION_KEY);
    Apparently it is not set then... But it works fine if the password is filled in within the range of the rule.
    Does anyone have any idea why this is caused? Am I missing something vital? Or am I doing something wrong? Thanx a lot for your time.
    Regards,
    Martijn

    Take a look at the stack trace, it shows you exactly where the error is coming from:
    java.lang.ClassCastException: org.theclass.candidate.view.SearchForm
    org.theclass.candidate.view.CandidateListAction.execute(CandidateListAction.java:41)Line 41 in your CandidateListAction.
    Probably it is failing on a cast of your action form.
    Taking a closer look at your struts-config, you are "chaining" actions.
    Your AddCandidateAction uses the candidateForm, and forwards to CandidateListAction.do
    Your CandidateListAction uses the searchForm.
    That will be the cause of your class cast exception.
    <action path="/Add"
      name="candidateForm"
      type="org.theclass.candidate.view.AddCandidateAction"
      validate ="true"
      input="/jsp/addcandidate.jsp">
      <forward name="success" path="/CandidateList.do"/>
    </action>
    <action path="/CandidateList"
    type="org.theclass.candidate.view.CandidateListAction"
    name="searchForm"
    scope="request" >
    <forward name="failure" path="/jsp/list.jsp"/>
    <forward name="success" path="/jsp/candidatelist.jsp"/>
    </action>Check out: http://struts.apache.org/1.x/faqs/newbie.html#chaining
    Solutions?
    - don't chain actions ;-)
    - use the same action form for both actions (possible?)
    - make the actionForward a "redirect" one. That means a new request, and losing any request parameters/attributes but should prevent this class cast exception.
    Hope this helps,
    evnafets

  • Help with java.lang.ClassCastException in JSSE

    I need an urgent help.
    i am writing code in JSSE for getting Server certificater(through SSL)
    i wrote
    public class url
    public static void main(String[] args)
    try
    System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
    Security.addProvider(new Provider());
    URL url=new URL("https://localhost:8443");
    HttpsURLConenction urlc=(HttpsURLConnection) url.openConnection();
    catch(Exception e)
    System.out.println(e);
    when i am executing this programing, i am getting the following run time error
    java.lang.ClassCastException
    I think i am getting error for the following line of code
    " HttpsURLConenction urlc=(HttpsURLConnection)url.openConnection(); "
    Please help me out to overcome this run time error.
    I would be grateful to you if you can solve my error

    Hi all
    I have the same error:
    java.lang.ClassCastException: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl
    MY CODE IS:
    // Set the system and security properties
                   System.setProperty("javax.net.ssl.trustStore",
                             "C:\\certificados\\cacerts");
                   System.setProperty("javax.net.ssl.trustStorePassword", "changeit");
                   // Keystore location and password
                   System.setProperty("javax.net.ssl.keyStore",
                             "C:\\certificados\\keystore");
                   System.setProperty("javax.net.ssl.keyStorePassword", "changeit");
    //Set the request
    String url_ = "https://195.235.160.165";
    //Creamos la petici�n html
    StringBuffer buffer = new StringBuffer();
    buffer.append(url_);
    buffer.append("/GPP/WLServer?Method=M_FINDIT&CLIENT=");
    buffer.append(client);
    buffer.append("&CLI_PASSWD=");
    buffer.append(cli_passwd);
    buffer.append("&USER=");
    buffer.append(user_login);
    buffer.append("&USER_PASSWD=");
    buffer.append(user_passwd);
    buffer.append("&TUSERID=");
    buffer.append(MSISDN);
    buffer.append("&TUSERID_TYPE=MSISDN");
    buffer.append("&GROUP=");
    buffer.append(group_id);
    buffer.append("&SRS=GPP:UTM28");
    url_ = buffer.toString();
    URL url = new URL(url_);
    HttpsURLConnection conn = (HttpsURLConnection)url.openConnection();
    conn.setHostnameVerifier(new HostnameVerifier() {
    public boolean verify(String hostname, SSLSession session)
    // I don't care if the certificate doesn't match host name
    return true;
    BufferedReader in = new BufferedReader(
                        new InputStreamReader(
                        conn.getInputStream()));
    //Creates a writer with the encoding parameter as "UTF-8"
    Writer out_ = new OutputStreamWriter(response.getOutputStream(), "UTF-8" );
    String inputLine;
         String fichero_in = "";
         while ((inputLine = in.readLine()) != null){               
         if(inputLine.length()!=0){
              System.out.println(inputLine);
              fichero_in = inputLine;
              out_.write(inputLine);
         in.close();
    //Sets the Content-Type header
    response.setContentType("application/xml; charset=utf-8");
         //response.setContentType("text/html; charset=UTF-8");
    //Sends the response XML to the client
    out_.write(url_);
    //out_.write(fichero_in);
    out_.flush();
    response.sendRedirect(response.encodeRedirectURL("out_"));
    Anyone can hel me??
    Thanks in advance

  • Java.lang.ClassCastException in EJB's

    Friends Need your suggestions on the following:-
    1. try {
    2.     InitialContext ctx = new InitialContext();
    3.     Object objref = ctx.lookup("ejb/test/MyTestSessionBean");
    4.     testSessionBean = (MyTestSessionHome) PortableRemoteObject.narrow(
    5.               objref, MyTestSessionHome.class);
    6. } catch (Exception NamingException) {
    7.      NamingException.printStackTrace();
    8. }
    I am unable to understand as to why I am getting an exception at line 4.
    The exception is:-
    11:21:56,649 ERROR [STDERR] java.lang.ClassCastException
    11:21:56,649 ERROR [STDERR] at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:
    293)
    11:21:56,649 ERROR [STDERR] at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:134)
    11:21:56,649 ERROR [STDERR] at test.session.SessionTestServlet.init(SessionTestServlet.java:29)
    11:21:56,649 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
    11:21:56,649 ERROR [STDERR] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
    11:21:56,649 ERROR [STDERR] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
    11:21:56,649 ERROR [STDERR] at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
    The above exception comes as soon as I deploy my ear to deploy folder in JBOSS.
    Thanks,
    Vishal

    I was facing the same proble. Simply diasble packaging class files in war file and the problem will be solved. Check build xml...I have commecnted class file addition in war file......Hope it solve your problem....I am beginer in Java technology...so dont hope expert repy from me in case your problem is still not solved....
    <?xml version="1.0"?>
    <!-- ==================================================== -->
    <!-- Build file for our first web application -->
    <!-- build.xml, Saturday, July 20, 2002 -->
    <!-- Author: Deepak Kumar -->
    <!-- Email : [email protected] -->
    <!-- Url : http://www.roseindia.net -->
    <!-- ==================================================== -->
    <project name="Jboss 3.0 tutorial series" default="all" basedir=".">
         <path id="build.classpath">
              <fileset dir="D:/JBOSS-4.0.4/server/default/lib/">
                   <include name="*.jar"/>
              </fileset>
         </path>
         <target name="init">
              <property name="dirs.base" value="${basedir}"/>
              <property name="classdir" value="${dirs.base}/build/src"/>
              <property name="src" value="${dirs.base}/src"/>
              <property name="web" value="${dirs.base}/web"/>
              <property name="deploymentdescription" value="${dirs.base}/deploymentdescriptors"/>
              <property name="warFile" value="example3.war"/>
              <property name="earFile" value="example3.ear"/>
              <property name="jarFile" value="example3.jar"/>
              <property name="earDir" value="${dirs.base}/build/ear"/>
              <property name="warDir" value="${dirs.base}/build/war"/>
              <property name="jarDir" value="${dirs.base}/build/jar"/>
              <!-- Create Web-inf and classes directories -->
              <mkdir dir="${warDir}/WEB-INF"/>
              <mkdir dir="${warDir}/WEB-INF/classes"/>
              <!-- Create Meta-inf and classes directories -->
              <mkdir dir="${earDir}/META-INF"/>
              <mkdir dir="${jarDir}/META-INF"/>
         </target>
         <!-- Main target -->
         <target name="all" depends="init,build,buildWar,buildJar,buildEar"/>
         <!-- Compile Java Files and store in /build/src directory -->
         <target name="build" >
              <javac srcdir="${src}" destdir="${classdir}" classpathref="build.classpath" debug="on" includes="**/*.java" />
         </target>
         <!-- Create the web archive File -->
         <target name="buildWar" depends="init">
    <!--          <copy todir="${warDir}/WEB-INF/classes">
                   <fileset dir="${classdir}" includes="**/*.class" />
              </copy>
    -->     
              <copy todir="${warDir}/WEB-INF">
                   <fileset dir="${deploymentdescription}/web/" includes="web.xml,jboss-web.xml" />
              </copy>
              <copy todir="${warDir}">
                   <fileset dir="${web}" includes="**/*.*" />
              </copy>
              <!-- Create war file and place in ear directory -->
              <jar jarfile="${earDir}/${warFile}" basedir="${warDir}" />
         </target>
         <!-- Create the jar File -->
         <target name="buildJar" depends="init">
              <copy todir="${jarDir}">
                   <fileset dir="${classdir}" includes="**/*.class" />
              </copy>
              <copy todir="${jarDir}/META-INF">
                   <fileset dir="${deploymentdescription}/jar/" includes="ejb-jar.xml,jboss.xml" />
              </copy>
              <!-- Create jar file and place in ear directory -->
              <jar jarfile="${earDir}/${jarFile}" basedir="${jarDir}" />
         </target>
         <!-- Create the ear File -->
         <target name="buildEar" depends="init">
              <copy todir="${earDir}/META-INF">
                   <fileset dir="${deploymentdescription}/ear" includes="application.xml" />
              </copy>
              <!-- Create ear file and place in ear directory -->
              <jar jarfile="${basedir}/${earFile}" basedir="${earDir}" />
         </target>
    </project>

  • Java.lang.ClassCastException  in local lookups

    hi,
    i have written two ejb projects named as proj1 and proj2.
    i deployed proj1 as EAR1 and proj2 as EAR2.(in same server)
    in proj1 Sessionbean1  i need to use(lookup) proj2 Sessionbean2 .
    <b>i have given jndi name for proj2 Sessionbean2 as "jndiproj2"</b>
    InitialContext ic=new InitialContext();
    Sessionbean2LocalHome home=(Sessionbean2LocalHome)ic.lookup("localejbs/jndiproj2");
    while i am running this application i am getting java.lang.ClassCastException.
    (this application is working fine if i deployed both proj1 and proj2 together as single EAR)
    regards
    Guru

    Have you ever connected to your SAP J2EE Engine using the Visual Administrator?  If so, you can go to Server->Service->JNDI Registry and look under the localejbs for the actual name that would work in the lookup method.
    It appears to me that you are missing the vendor.  If you have not specified a vendor in the application-j2ee-engine.xml, then it is by default "sap.com", then your ejb application name, then you EJB name.
    I have created a bean SurveyReportsBean with my SurveyApp with the vendor of pcbp.com.  My lookup would be:
    "localejbs/pcbp.com/SurveyApp/SurveyReportsBean"
    Hope this helps.

  • Java.lang.ClassCastException in WebLogic 10.3.3 after recompile

    While editing some code a developer noticed this error after a recompile in Weblogic 10.3.3. And the underlying object is a DimensionLabel. And we tried this in Weblogic 9.2 and it works fine with no exception. The developer simply recompiled the class calling the DimensionLabel the SearchServiceProcessor and reran the application.
    net.nrj.service.SearchServiceProcessor java.lang.ClassCastException: net.nrj.alf.DimensionLabel java.lang.ClassCastException: net.nrj.alf.DimensionLabel at net.nrj.service.SearchServiceProcessor.setRefinements(SearchServiceProcessor.java:911) at net.nrj.service.SearchServiceProcessor.process(SearchServiceProcessor.java:134) at net.nrj.service.ServiceController.processRequest(ServiceController.java:323) at net.nrj.service.ServiceController.doGet(ServiceController.java:307) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at javax.servlet.http.HttpServlet.service(HttpServlet.java:821) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:529) at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:253) at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:719) at weblogic.servlet.internal.ServletResponseImpl.sendError(ServletResponseImpl.java:591) at weblogic.servlet.FileServlet.findSource(FileServlet.java:270) at weblogic.servlet.FileServlet.doGetHeadPost(FileServlet.java:191) at weblogic.servlet.FileServlet.service(FileServlet.java:173) at javax.servlet.http.HttpServlet.service(HttpServlet.java:821) at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227) at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300) at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:184) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.doIt(WebAppServletContext.java:3686) at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3650) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121) at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2268) at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2174) at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1446) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    Thanks, Tom
    PS
    Here is my code :
    DimensionLabel dimLabel = (DimensionLabel);
    dimensionLabel.get(currentDimension.getName());
    currentRefinementDimension = new Refinement(); // Exception here
    currentRefinementDimension.setExpanded(true);
    I debugged into the code and the hashtable dimensionLabel has a DimensionLabel in it.
    Edited by: thenrick on Dec 10, 2010 3:15 PM

    Hi,
    Please make sure that there is no other version of *"net.nrj.alf.DimensionLabel"* class present in any other Class Loader
    There are various kind of Class Loaders : PreMordial Class Loader, BootStrap ClassLoader, System Class Loader (WebLogic ClassLoader), Application ClassLoader, Module Class Loader....
    net.nrj.service.SearchServiceProcessor java.lang.ClassCastException: net.nrj.alf.DimensionLabel java.lang.ClassCastException: net.nrj.alf.DimensionLabel If your code is working fine in WLS9.2 it means in WLS10.3.3 the same class is getting loaded from different Class Loaders...In order to find out which classLoader is being used to load that class please do the following:
    <b><font color=maroon>
    Class dimentionLevel=Class.forName("net.nrj.alf.DimensionLabel")
    ClassLoader cl=dimentionLevel.getClassLoader();
    System.out.println("\n\n\t DimentionLevel is loaded from ClassLoader: "+cl);
    </font></b>
    Above 3 Lines of code you need to write for "net.nrj.service.SearchServiceProcessor" class as well...Because i suspect that these two classes are getting loaded from two different class Loaders.
    If the Application Code is 100% correct The Main reason of ClassCastException is Classes are getting Loaded from two Different Class Loaders. You can also look at the Filtering ClassLoader Feature of WebLogic to Tell WebLogic to Load some Classes from a Specific ClassLoaders...As described Here .*http://middlewaremagic.com/weblogic/?page_id=192*
    Thanks
    Jay SenSharma
    http://middlewaremagic.com/weblogic/?page_id=2261  (Middleware magic Is Here)

  • Java.lang.ClassCastException in FOTable while inserting fo:table-row

    Hi
    Template Builder of in word was throwing error 'java.lang.ClassCastException:oracle.apps.xdo.template.fo.elements.table.FOTable'.This error comes whenever i introduce <fo:table-row> tag.
    I am using XML Desktop Pubisher 5.5 Build Version
    Please help me out.
    Thanks
    Darshan

    Sorry for the trouble . I have found out the solution
    So this thread can be closed.
    Thanks
    Darshan

Maybe you are looking for