|
From: Leif M. <le...@ta...> - 2006-10-10 05:07:10
|
David, Please keep replies on the list for the benefit of other users. I saw a couple problems off the bat. They are both basic Java problems so I wonder if you are new to Java. :-) The first is your classpath. You specified the following: wrapper.java.classpath.1=C:\Temp\ProxyServer\lib\wrapper.jar wrapper.java.classpath.2=C:\Temp\ProxyServer\bin\proxy.class It looks like you have some un jared classes in your bin directory. In that case, rather than including all of those classes on your class path, you should include the root directory that contains your packages and classes. So try the following: wrapper.java.classpath.1=C:\Temp\ProxyServer\lib\wrapper.jar wrapper.java.classpath.2=C:\Temp\ProxyServer\bin\ In general, a better way of doing this is to create a classes directory under lib and then place your unjared classes there. You would then have: wrapper.java.classpath.1=C:\Temp\ProxyServer\lib\wrapper.jar wrapper.java.classpath.2=C:\Temp\ProxyServer\lib\classes The second problem is with your main class. You secified the following arguments to the WrapperSimpleApp class: wrapper.app.parameter.1=proxy.main wrapper.app.parameter.2=1234 wrapper.app.parameter.3=192.168.2.70 wrapper.app.parameter.4=4999 Unless you have an inner class named main. This is probably incorrect. You want to specify the class name rather than the method name. This should be: wrapper.app.parameter.1=proxy wrapper.app.parameter.2=1234 wrapper.app.parameter.3=192.168.2.70 wrapper.app.parameter.4=4999 Third is a style issue. In general, Java class names are always capitalized. This is done to make it clear what is a class and what is a method name. So to follow this standard, your "proxy" class should be named "Proxy". Cheers, Leif David Schulberg wrote: > Hi Leif, > > I gratefully accept your offer to checkout my wrapper.conf file. > I continue to get the error > WrapperSimpleApp: Unable to locate the class proxy: > java.lang.ClassNotFoundException: proxy > > Regards, > David > > -----Original Message----- > From: Leif Mortenson [mailto:le...@ta...] > Sent: Monday, 9 October 2006 10:33 AM > To: da...@ev...; wra...@li... > Subject: Re: [Wrapper-user] Using WrapperSimpleApp Integration > > David, > If that is what your command line looks like then your CLASSPATH must be > getting > defined as a system property. I assume that you are having problems when > running as > a service? This would be because you have not set the CLASSPATH as a > system wide > environment variable. > > That said, the CLASSPATH environment variable is BAD BAD BAD! You will > run into problems if you try to use more than one application on the > same machine. > > You really should be using the -classpath parameter to the JVM. This is the > normal way to be using the wrapper. > > Make you you have defined classpath properties for each jar and classes > directory > that would normally go on your classpath. > > If you have more questions, include your wrapper.conf file so I can see > exactly > what you are doing. > > Cheers, > Leif > > David Schulberg wrote: > >> A simple question regarding using the Method 1 - WrapperSimpleApp >> Integration with my java application which I normally run from Windows >> command line >> >> "java proxy parm1 parm2 parm3". >> >> Getting error: Unable to locate the class proxy: >> java.lang.ClassNotFoundException: proxy >> >> What should I be defining in my wrapper.conf to overcome this error? >> The application proxy comprises just class proxy with method >> >> 'public static void main(String args[]).' >> >> Regards, >> >> David >> >> > > |