facebook

Packaged deploy to Tomcat fails

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #250837 Reply

    jptinsman
    Member

    We have just recently moved over to myEclipse from Websphere and have been able to build and localy deploy our projects to the Tomcat 4 server. However, when we try to deploy to the live server it seems that the war file is not being built correctly.

    I am running on:

    Windows 2000
    Eclipse 3.1.1
    MyEclipse 4.1.1

    My problem is I have tried to make a .war file through Ant, [project]-> Export -> J2EE war, and through the “Deploy My J2EE Project to Server.. ” button and choosing <Custom Location Suffixed> option that was a packaged archive. I can create the .war file, but when I deploy it to Tomcat 4.1.30 I get an error when I try to enter the application.

    
    Root cause
    
    java.lang.NoSuchMethodError: java.math.BigDecimal.<init>(I)V
        at com.randr.scmportal.user.UserDetails.<clinit>(UserDetails.java:242)
        at com.randr.scmportal.mvcAbstract.AbstractController.loadUserProfile(AbstractController.java:191)
        at com.randr.scmportal.mvcAbstract.AbstractController.doGet(AbstractController.java:151)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
           ....
    

    The NoSuchMethodError: java.math.BigDecimal in our UserDetails class is:

    
        public static final BigDecimal ACTIVE = new BigDecimal( 1 );
    

    Does this have to do with the way the code is compiled? Is there any way to fix this?

    —————————————————————————————

    My coworker is having a slightly different problem with his war file creation

    Windows XP
    Eclipse 3.1.2
    MyEclipse 4.1.1

    When ever he tries to make a .war file his system takes an extremely long time utilizing 100% CPU with memory still available. He has let it continue for aproximately 45 min and then had to terminate MyEclipse since the “Cancel” button was greyed out. He thought it might be his anti-virus, but there was no change when he disabled it. Has anyone else seen similar behavior? If so, what steps would we have to take to fix this?

    #250841

    Scott Anderson
    Participant

    Does this have to do with the way the code is compiled? Is there any way to fix this?

    It likely has to do with using one level of the JDK to compile the code (say, 1.5) and another to run Tomcat (like 1.3/1.4). During deployment the class files from Eclipse are copied over to the deployment and are not recompiled so they need to be compiled in Eclipse with a class file level that can be understood by the JDK running Tomcat.

    When ever he tries to make a .war file his system takes an extremely long time utilizing 100% CPU

    This sounds like a configuration problem. I’d try two things. First, I’d restart one time with the -clean option (eclipse.exe -clean), then shutdown and add the following arguments to the startup path:
    eclipse.exe -vmargs -Duser.language=en -Xms128M -Xmx512M -XX:PermSize=64M -XX:MaxPermSize=128M
    I think the combination of the two should resolve the issue.

    #250850

    jptinsman
    Member

    We took a look at our project and eclipse configuration. We are running 1.4 compliance on the java compiler and our Tomcat is running 1.4 as well. My JRE is 1.5 We also noticed that the J2EE compliance is set to 1.4. Will we have to downgrade our J2EE version to run on our existing Tomcat. We will test out these combinations in the next few days. Are we on the right track?

    In regards to the long construction time for the .war file. We will try out your suggestions. We did switch to Eclipse 3.1.1 and it is only slightly faster but was able to create a .war file in 25 min. Just as a note: WSAD 5.1 is taking aprox 1.5 min.

    Thanks for your help, we will let you know how this turns out.

    #250889

    curtisk
    Member

    Used clean and added arguments to startup. War file creation is still taking 24 minutes. 100% cpu can’t really do anything else when it is running. On the positive side my eclipse is set up using only jdk 1.4 and my war file does work when deployed to the server. Any other ideas what to look at to speed up war file creation?

Viewing 4 posts - 1 through 4 (of 4 total)
Reply To: Packaged deploy to Tomcat fails

You must be logged in to post in the forum log in