1 Reply Latest reply on Dec 4, 2002 3:11 AM by vickyk

    Re: java.lang.ClassCastException

    srshende

      Hello ,
      There are two problems with redeploying ejb jar.
      1*** I access the redeployed ejb without redeploying war directory:::: In this case I get::::::::

      java.rmi.ServerException: Invalid invocation, check your deployment packaging, method=public abstract dxdam.ejb.ingest.UploadTest dxdam.ejb.ingest.UploadTestHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException; nested exception is:
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract dxdam.ejb.ingest.UploadTest dxdam.ejb.ingest.UploadTestHome.create() throws java.rmi.RemoteException,javax.ejb.CreateException
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:119)


      2****. Now I redeploy war directory after redeploying ejb jar files and access the ejbs:::: In this case I get::::: java.lang.ClassCastException
      at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:293).

      At present I don't want to created ear for every single change in java files. I can create ear when the application is completely ready for deployment. So can you suggest me some good option :
      I am using JBOSS-3.0.0 with TOMCAT4.0.3 and jdk1.4

      Awaiting your reply

      ~Sanjay

        • 1. Re: java.lang.ClassCastException
          vickyk

          Hi Sanjay,
          What you can do just save the application.xml file every time you want the ejb to change.It will redploy the application,the convienientt way.If there is the structure like
          Project.ear
          with application.xml as

          <?xml version="1.0"?>
          <!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">


          <display-name>Project</display-name>


          login.jar




          gangster.jar




          <web-uri>project.war</web-uri>
          <context-root>/project</context-root>





          You just keep on resaving the file it should do the job for you without resaving.
          Regards
          Vicky