Problems with JDK 1.5

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems with JDK 1.5

Jason Tamulonis
Problems with JDK 1.5

Hello,
   When we upgraded from Java 1.4.2_06 to 1.5 I can no longer get the Jetty server to load any jsp page no matter how simple. Whenever I  try to load a jsp page I get the following error:

HTTP ERROR: 500
Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
    [javac] Compiling 1 source file

error: error reading C:\Program Files\Java\jdk1.5.0_03\lib\ir.idl; java.util.zip.ZipException: error in opening zip file

Note: C:\DOCUME~1\Jason\LOCALS~1\Temp\Jetty__9090__\index_jsp.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

This is the bat file I use to launch the server:

        rem defines JAVA_HOME and SHARPINFO_HOME
        call homes.bat

        %JAVA_HOME%\bin\java -Xmx512M -Dsharpinfo.base="%SHARPINFO_HOME%" -Dsharpinfo.jython_console="please" -Djava.ext.dirs=%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib\ext;"%SHARPINFO_HOME%\lib" -Djava.home="C:\Program Files\Java\jdk1.5.0_03" usp.sharpInfo.app.Server

Homes.bat looks like this:

        rem Home Directories for Sharpinfo Batch files
        set JAVA_HOME=C:\Progra~1\Java\jdk1.5.0_03
        set SHARPINFO_HOME=C:\Project\sharpinfo\sharpinfoApp

usp.sharpInfo.app.Server creates a new JettyFacade and calls StartServer with the parameters being passed in. This is the core of the server code JettyFacade.java :

package usp.sharpInfo.app;

import java.util.*;

import java.io.File;

import org.mortbay.http.ajp.AJP13Listener;
import org.mortbay.http.handler.ResourceHandler;
import org.mortbay.http.handler.DumpHandler;
import org.mortbay.http.handler.ForwardHandler;
import org.mortbay.http.handler.HTAccessHandler;
import org.mortbay.http.HttpContext;
import org.mortbay.http.HashUserRealm;
import org.mortbay.http.HttpServer;
import org.mortbay.jetty.Server;
import org.mortbay.http.SecurityConstraint;
import org.mortbay.http.SocketListener;
import org.mortbay.http.NCSARequestLog;
import org.mortbay.jetty.servlet.ServletHttpContext;
import org.mortbay.util.InetAddrPort;
import org.mortbay.http.handler.IPAccessHandler;

import usp.sharpInfo.imaging.*;
import usp.sharpInfo.Sharpinfo;

import org.apache.log4j.Logger;

/**
 * This initializes and controls the embedded HTTP Web Server.  The goal is to minimize
 * the footprint and complexity of keeping a reliable web server together.
 *
 */
public class JettyFacade
{
    static Logger logger = Logger.getLogger("usp.sharpInfo.app.JettyFacade");

    ServletHttpContext itsContext;

    public void startServer(String baseDir, int port, Object sharpinfo,
                            Object imageServerTracker, Object imageServer,
                            String hostIP, Object classroom, int retainDays)
    {
        Properties sysProps = System.getProperties();

        if (sysProps.getProperty("jetty.home") == null)
        {
            logger.debug("Jetty home is being set to the base dir.");
            sysProps.put("jetty.home", baseDir);
        }

        logger.info("jetty home: " + baseDir);

        //  -DLOG_FILE=./logs/debug_yyyy_mm_dd.log \
        if (sysProps.getProperty("LOG_FILE") == null)
        {
            String logFilename = baseDir + "log/yyyy_mm_dd_web.log";
            sysProps.put("LOG_FILE", logFilename);
        }

        try
        {
            // Instantiate the Jetty server witha  configuration XML file.
            File configFile = new File(sysProps.getProperty("jetty.home"),"webapps/root/WEB-INF/jetty.xml");
            org.mortbay.jetty.Server server = null;
            if (configFile.exists()) {
                server = new org.mortbay.jetty.Server(configFile.toString());
            } else {
                server = new org.mortbay.jetty.Server();
            }
            //HttpServer server = new HttpServer();

            SocketListener listener = new SocketListener();
            listener.setPort(port);

            // Split the host IP address into it's individual components.  If there
            // are not four components, then it is not a valid IP address.
            if (hostIP != null ) {
                StringTokenizer result = new StringTokenizer(hostIP,".");
                if (result.countTokens() == 4) {
                    listener.setHost(hostIP);
                }
            }

            listener.setMaxIdleTimeMs(60000);
            listener.setMinThreads(10);

            Sharpinfo info = (Sharpinfo)Sharpinfo;
            listener.setMaxThreads(new Integer(info.getProperty("max_threads")).intValue());

            server.addListener(listener);

            // add an ajp13 listener too
/*
            AJP13Listener ajpListener = new AJP13Listener();
            ajpListener.setPort(8009);
            ajpListener.setMaxIdleTimeMs(60000);
            ajpListener.setMinThreads(10);
            server.addListener(ajpListener);
*/

            String requestLogFilename = baseDir + "log/yyyy_mm_dd_request.log";
            NCSARequestLog requestLog = new NCSARequestLog(requestLogFilename);
            requestLog.setRetainDays(retainDays);
            requestLog.setAppend(true);
            requestLog.setBuffered(true);
            requestLog.setExtended(true);
            requestLog.setLogTimeZone("GMT");

            // this request log is nice, but it can take over lots of
            // hard drive space over time.
            server.setRequestLog(requestLog);

           
          
                // do everything in a webapp with a web.xml
                server.setRootWebApp("root");
                server.addWebApplications(System.getProperty("jetty.home",".") + "webapps/");

                String thumbnailCache = baseDir.concat("thumbnails");
                File f = new File(thumbnailCache);
                if (!f.exists())
                {
                    f.mkdir();
                }

                HttpContext[] contexts = (HttpContext[])server.getContexts();

                for(int i = 0; i < contexts.length; i++)
                {
                    contexts[i].setAttribute("sharpinfo", sharpinfo);
                    contexts[i].setAttribute("classroom", classroom);

                    contexts[i].setAttribute("imageServerTracker", imageServerTracker);
                    contexts[i].setAttribute("imageServer", imageServer);

                    contexts[i].setAttribute("thumbnailCache", thumbnailCache);
                }
           

            // Start handlers and listener
            server.start();

        }
        catch (Exception e)
        {
            logger.error("Jetty init", e);
        }
    }

    // this only works if the java classloader doesn't have
    // the servlets cached in memory (which is usually the case)
    public void restart()
    {
        try
        {
            logger.warn("restart attempted");

            itsContext.stop();
            itsContext.start();
        }
        catch (Exception e)
        {
            logger.error("restart failed", e);
        }
    }
}

All of this works with JDK 1.4, any help will be greatly appreciated.

Thanks,

    Jason

Reply | Threaded
Open this post in threaded view
|

Re: Problems with JDK 1.5

jan_bartel
Jason,

Have you double-checked that the jsp code is JDK1.5 compliant? Googling
around for your exception indicates that it can be caused by trying to
put different types of object into the same collection. Eg:

http://forum.java.sun.com/thread.jspa?threadID=584311&messageID=3009738

cheers
Jan

Jason Tamulonis wrote:

> Hello,
>    When we upgraded from Java 1.4.2_06 to 1.5 I can no longer get the
> Jetty server to load any jsp page no matter how simple. Whenever I  try
> to load a jsp page I get the following error:
>
> HTTP ERROR: 500
> Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
>     [javac] Compiling 1 source file
>
> error: error reading C:\Program Files\Java\jdk1.5.0_03\lib\ir.idl;
> java.util.zip.ZipException: error in opening zip file
>
> Note: C:\DOCUME~1\Jason\LOCALS~1\Temp\Jetty__9090__\index_jsp.java uses
> unchecked or unsafe operations.
> Note: Recompile with -Xlint:unchecked for details.
> 1 error******
>
> This is the bat file I use to launch the server:
>
>         rem defines JAVA_HOME and SHARPINFO_HOME
>         call homes.bat
>
>         %JAVA_HOME%\bin\java -Xmx512M
> -Dsharpinfo.base="%SHARPINFO_HOME%" -Dsharpinfo.jython_console="please"
> -Djava.ext.dirs=%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib\ext;"%SHARPINFO_HOME%\lib"
> -Djava.home="C:\Program Files\Java\jdk1.5.0_03" usp.sharpInfo.app.Server
>
> Homes.bat looks like this:
>
>         rem Home Directories for Sharpinfo Batch files
>         set JAVA_HOME=C:\Progra~1\Java\jdk1.5.0_03
>         set SHARPINFO_HOME=C:\Project\sharpinfo\sharpinfoApp
>
> usp.sharpInfo.app.Server creates a new JettyFacade and calls StartServer
> with the parameters being passed in. This is the core of the server code
> JettyFacade.java :
>
> package usp.sharpInfo.app;
>
> import java.util.*;
>
> import java.io.File;
>
> import org.mortbay.http.ajp.AJP13Listener;
> import org.mortbay.http.handler.ResourceHandler;
> import org.mortbay.http.handler.DumpHandler;
> import org.mortbay.http.handler.ForwardHandler;
> import org.mortbay.http.handler.HTAccessHandler;
> import org.mortbay.http.HttpContext;
> import org.mortbay.http.HashUserRealm;
> import org.mortbay.http.HttpServer;
> import org.mortbay.jetty.Server;
> import org.mortbay.http.SecurityConstraint;
> import org.mortbay.http.SocketListener;
> import org.mortbay.http.NCSARequestLog;
> import org.mortbay.jetty.servlet.ServletHttpContext;
> import org.mortbay.util.InetAddrPort;
> import org.mortbay.http.handler.IPAccessHandler;
>
> import usp.sharpInfo.imaging.*;
> import usp.sharpInfo.Sharpinfo;
>
> import org.apache.log4j.Logger;
>
> /**
>  * This initializes and controls the embedded HTTP Web Server.  The goal
> is to minimize
>  * the footprint and complexity of keeping a reliable web server together.
>  *
>  */
> public class JettyFacade
> {
>     static Logger logger =
> Logger.getLogger("usp.sharpInfo.app.JettyFacade");
>
>     ServletHttpContext itsContext;
>
>     public void startServer(String baseDir, int port, Object sharpinfo,
>                             Object imageServerTracker, Object imageServer,
>                             String hostIP, Object classroom, int
> retainDays)
>     {
>         Properties sysProps = System.getProperties();
>
>         if (sysProps.getProperty("jetty.home") == null)
>         {
>             logger.debug("Jetty home is being set to the base dir.");
>             sysProps.put("jetty.home", baseDir);
>         }
>
>         logger.info("jetty home: " + baseDir);
>
>         //  -DLOG_FILE=./logs/debug_yyyy_mm_dd.log \
>         if (sysProps.getProperty("LOG_FILE") == null)
>         {
>             String logFilename = baseDir + "log/yyyy_mm_dd_web.log";
>             sysProps.put("LOG_FILE", logFilename);
>         }
>
>         try
>         {
>             // Instantiate the Jetty server witha  configuration XML file.
>             File configFile = new
> File(sysProps.getProperty("jetty.home"),"webapps/root/WEB-INF/jetty.xml");
>             org.mortbay.jetty.Server server = null;
>             if (configFile.exists()) {
>                 server = new
> org.mortbay.jetty.Server(configFile.toString());
>             } else {
>                 server = new org.mortbay.jetty.Server();
>             }
>             //HttpServer server = new HttpServer();
>
>             SocketListener listener = new SocketListener();
>             listener.setPort(port);
>
>             // Split the host IP address into it's individual
> components.  If there
>             // are not four components, then it is not a valid IP address.
>             if (hostIP != null ) {
>                 StringTokenizer result = new StringTokenizer(hostIP,".");
>                 if (result.countTokens() == 4) {
>                     listener.setHost(hostIP);
>                 }
>             }
>
>             listener.setMaxIdleTimeMs(60000);
>             listener.setMinThreads(10);
>
>             Sharpinfo info = (Sharpinfo)Sharpinfo;
>             listener.setMaxThreads(new
> Integer(info.getProperty("max_threads")).intValue());
>
>             server.addListener(listener);
>
>             // add an ajp13 listener too
> /*
>             AJP13Listener ajpListener = new AJP13Listener();
>             ajpListener.setPort(8009);
>             ajpListener.setMaxIdleTimeMs(60000);
>             ajpListener.setMinThreads(10);
>             server.addListener(ajpListener);
> */
>
>             String requestLogFilename = baseDir +
> "log/yyyy_mm_dd_request.log";
>             NCSARequestLog requestLog = new
> NCSARequestLog(requestLogFilename);
>             requestLog.setRetainDays(retainDays);
>             requestLog.setAppend(true);
>             requestLog.setBuffered(true);
>             requestLog.setExtended(true);
>             requestLog.setLogTimeZone("GMT");
>
>             // this request log is nice, but it can take over lots of
>             // hard drive space over time.
>             server.setRequestLog(requestLog);
>
>            
>          
>                 // do everything in a webapp with a web.xml
>                 server.setRootWebApp("root");
>                
> server.addWebApplications(System.getProperty("jetty.home",".") +
> "webapps/");
>
>                 String thumbnailCache = baseDir.concat("thumbnails");
>                 File f = new File(thumbnailCache);
>                 if (!f.exists())
>                 {
>                     f.mkdir();
>                 }
>
>                 HttpContext[] contexts =
> (HttpContext[])server.getContexts();
>
>                 for(int i = 0; i < contexts.length; i++)
>                 {
>                     contexts[i].setAttribute("sharpinfo", sharpinfo);
>                     contexts[i].setAttribute("classroom", classroom);
>
>                     contexts[i].setAttribute("imageServerTracker",
> imageServerTracker);
>                     contexts[i].setAttribute("imageServer", imageServer);
>
>                     contexts[i].setAttribute("thumbnailCache",
> thumbnailCache);
>                 }
>            
>
>             // Start handlers and listener
>             server.start();
>
>         }
>         catch (Exception e)
>         {
>             logger.error("Jetty init", e);
>         }
>     }
>
>     // this only works if the java classloader doesn't have
>     // the servlets cached in memory (which is usually the case)
>     public void restart()
>     {
>         try
>         {
>             logger.warn("restart attempted");
>
>             itsContext.stop();
>             itsContext.start();
>         }
>         catch (Exception e)
>         {
>             logger.error("restart failed", e);
>         }
>     }
> }
>
> All of this works with JDK 1.4, any help will be greatly appreciated.
>
> Thanks,
>
>     Jason
>



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Problems with JDK 1.5

Jason Tamulonis

Jan Bartel <janb <at> mortbay.com> writes:

>
> Jason,
>
> Have you double-checked that the jsp code is JDK1.5 compliant? Googling
> around for your exception indicates that it can be caused by trying to
> put different types of object into the same collection. Eg:
>
> http://forum.java.sun.com/thread.jspa?threadID=584311&messageID=3009738
>
> cheers
> Jan
>


Hey Jan,
    I looked at that link and I recompiled with the -Xlint:unchecked and there
where alot of warnings reguarding hashmaps. Seeing as they are only warnings can
these still be causing my problems? Not really sure how that would relate to:

error: error reading C:\Program Files\Java\jdk1.5.0_03\lib\ir.idl;
java.util.zip.ZipException: error in opening zip file

To make things a little more complicated this code needs to run on both jdk1.4
and jdk1.5. Won't doing the data type casting for 1.5 cause problems with it
running in 1.4

Thanks Again,
   Jason




-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Re: Problems with JDK 1.5

Nicolas Modrzyk-4
Hi Jason,

I ran into that problem on OSX. The jasper compiler cannot run on  
JDK1.5 on mac.
There is a quick summary there:
http://www.burnthacker.com/archives/000218.html

Basically, install both if you want, but keep 1.4.2 for webapps.

A bug report has been filed to apple.

Nicolas Modrzyk,

On May 24, 2005, at 4:08 AM, Jason wrote:

>
> Jan Bartel <janb <at> mortbay.com> writes:
>
>
>>
>> Jason,
>>
>> Have you double-checked that the jsp code is JDK1.5 compliant?  
>> Googling
>> around for your exception indicates that it can be caused by  
>> trying to
>> put different types of object into the same collection. Eg:
>>
>> http://forum.java.sun.com/thread.jspa?
>> threadID=584311&messageID=3009738
>>
>> cheers
>> Jan
>>
>>
>
>
> Hey Jan,
>     I looked at that link and I recompiled with the -
> Xlint:unchecked and there
> where alot of warnings reguarding hashmaps. Seeing as they are only  
> warnings can
> these still be causing my problems? Not really sure how that would  
> relate to:
>
> error: error reading C:\Program Files\Java\jdk1.5.0_03\lib\ir.idl;
> java.util.zip.ZipException: error in opening zip file
>
> To make things a little more complicated this code needs to run on  
> both jdk1.4
> and jdk1.5. Won't doing the data type casting for 1.5 cause  
> problems with it
> running in 1.4
>
> Thanks Again,
>    Jason
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Problems with JDK 1.5

Greg Wilkins-5
In reply to this post by Jason Tamulonis


Jason,

can you confirm if the jetty demo works out of the box on 1.5?
It does for me (latest 5.1.4rc0)

Jason wrote:

> Jan Bartel <janb <at> mortbay.com> writes:
>
>
>>Jason,
>>
>>Have you double-checked that the jsp code is JDK1.5 compliant? Googling
>>around for your exception indicates that it can be caused by trying to
>>put different types of object into the same collection. Eg:
>>
>>http://forum.java.sun.com/thread.jspa?threadID=584311&messageID=3009738
>>
>>cheers
>>Jan
>>
>
>
>
> Hey Jan,
>     I looked at that link and I recompiled with the -Xlint:unchecked and there
> where alot of warnings reguarding hashmaps. Seeing as they are only warnings can
> these still be causing my problems? Not really sure how that would relate to:
>
> error: error reading C:\Program Files\Java\jdk1.5.0_03\lib\ir.idl;
> java.util.zip.ZipException: error in opening zip file
>
> To make things a little more complicated this code needs to run on both jdk1.4
> and jdk1.5. Won't doing the data type casting for 1.5 cause problems with it
> running in 1.4
>
> Thanks Again,
>    Jason
>
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by Oracle Space Sweepstakes
> Want to be the first software developer in space?
> Enter now for the Oracle Space Sweepstakes!
> http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
> _______________________________________________
> Jetty-support mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jetty-support
>



-------------------------------------------------------
This SF.Net email is sponsored by Oracle Space Sweepstakes
Want to be the first software developer in space?
Enter now for the Oracle Space Sweepstakes!
http://ads.osdn.com/?ad_id=7412&alloc_id=16344&op=click
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Problems with JDK 1.5

Jason Tamulonis

Greg Wilkins <gregw <at> mortbay.com> writes:

>
>
> Jason,
>
> can you confirm if the jetty demo works out of the box on 1.5?
> It does for me (latest 5.1.4rc0)
>
> Jason wrote:
> > Jan Bartel <janb <at> mortbay.com> writes:
> >


Hey Greg,
    That was the first step I took a while back was to get a Jetty server to
serve JSP pages using the start.jar and the simple examples on the Jetty
website. I got that working and serving JSP pages fine. Don't think that is the
same as the official demo but should serve the same purpose. It was the most
update package on the website.

Thanks,
   Jason




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Problems with JDK 1.5

Jason Tamulonis
In reply to this post by Nicolas Modrzyk-4
Nicolas Modrzyk <hellonico <at> gmail.com> writes:

>
> Hi Jason,
>
> I ran into that problem on OSX. The jasper compiler cannot run on  
> JDK1.5 on mac.
> There is a quick summary there:
> http://www.burnthacker.com/archives/000218.html
>
> Basically, install both if you want, but keep 1.4.2 for webapps.
>
> A bug report has been filed to apple.
>
> Nicolas Modrzyk,
>
> On May 24, 2005, at 4:08 AM, Jason wrote:
>
> >
> > Jan Bartel <janb <at> mortbay.com> writes:
> >

Hey Nicolas,

     I'm running Win 2000 and XP.

Thanks,
   Jason




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support
Reply | Threaded
Open this post in threaded view
|

Re: Problems with JDK 1.5

Jason Tamulonis
In reply to this post by Jason Tamulonis
Jason Tamulonis <jason <at> microbrightfield.com> writes:

>
>
> Hello,
>
>    When we upgraded from Java 1.4.2_06 to 1.5 I can no longer get the Jetty
server to load any jsp page no matter how simple. Whenever I  try to load a jsp
page I get the following error:

> HTTP ERROR: 500
>
> Unable to compile class for JSP
>
> An error occurred at line: -1 in the jsp file: null
>
> Generated servlet error:
>
>     [javac] Compiling 1 source file
>
> error: error reading C:\Program Files\Java\jdk1.5.0_03\lib\ir.idl;
java.util.zip.ZipException: error in opening zip file
> Note: C:\DOCUME~1\Jason\LOCALS~1\Temp\Jetty__9090__\index_jsp.java uses
unchecked or unsafe operations.

>
> Note: Recompile with -Xlint:unchecked for details.
>
> 1 error
>
> This is the bat file I use to launch the server:
>
>         rem defines JAVA_HOME and SHARPINFO_HOME
>
>         call homes.bat
>
>         %JAVA_HOME%\bin\java -Xmx512M -Dsharpinfo.base="%SHARPINFO_HOME%"
-Dsharpinfo.jython_console="please"
-Djava.ext.dirs=%JAVA_HOME%\lib;%JAVA_HOME%\jre\lib\ext;"%SHARPINFO_HOME%\lib"
-Djava.home="C:\Program Files\Java\jdk1.5.0_03" usp.sharpInfo.app.Server
> Homes.bat looks like this:
>
>         rem Home Directories for Sharpinfo Batch files
>
>         set JAVA_HOME=C:\Progra~1\Java\jdk1.5.0_03
>
>         set SHARPINFO_HOME=C:\Project\sharpinfo\sharpinfoApp
>


Well I debugged exactly what the problem was but now I'm having a hard time
fixing it.. For some reason in JDK 1.5 -Djava.ext.dirs grabs all files in the
directories no matter what file extension. When the Jetty server tried to
compile the JSP pages it added the .idl files in the Java_HOME\lib and tried to
unzip them like a jar file which caused the error.

So....

I took the JAVA_HOME\lib out of the java.ext.dirs line and added the four jar
files in by adding the following to the command line:

-cp %JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar;etc..

Now when you run the simple jsp page the server throws this error:

Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK

Now I know JAVA_HOME is set so I don't know why it can't find the tools.jar

I have been able to rig the server to run fine by dumbing the JDK jars into
SHARPINFO_HOME lib folder but unfortunately we can't distrubute the application
like this so I need a solution that involves leaving the jars where they are.




-------------------------------------------------------
This SF.Net email is sponsored by Yahoo.
Introducing Yahoo! Search Developer Network - Create apps using Yahoo!
Search APIs Find out how you can build Yahoo! directly into your own
Applications - visit http://developer.yahoo.net/?fr=offad-ysdn-ostg-q22005
_______________________________________________
Jetty-support mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jetty-support