Re: Difference between running bootstrap.jar and catalina.bat
Hi, Finally I managed It. Sadly, by different way. Every librarie magics failed than I wrote new web service based on axis. It's used jaxb1. Thank you all for your time. Jan. On Fri, May 15, 2009 at 4:57 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jan, > > On 5/15/2009 1:25 AM, Jan Horký wrote: > > I got the following error: > > > > 15.5.2009 7:10:16 > > com.sun.xml.ws.transport.http.servlet.WSServletContextListener > > contextInitialized > > SEVERE: WSSERVLET11: failed to parse runtime descriptor: > > java.lang.VerifyError: (class: com/sun/xml/ws/model/AbstractSEIModelImpl, > > method: createJAXBContext signature: > ()Lcom/sun/xml/bind/api/JAXBRIContext;) > > Incompatible argument to function java.lang.VerifyError: (class: > > com/sun/xml/ws/model/AbstractSEIModelImpl, method: createJAXBContext > > signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;) Incompatible argument > > to function > > You have mismatched your libraries: you have a .class file that is > trying to call something like createJAXBContext(FooType) and the > function available is actually createJABXContext(BarType). > > You need to make sure that the libraries used to compile your code are > the same as those used to run it. All the libraries your application > needs to run should be in your webapp's WEB-INF/lib directory. Try > removing everything you added to Tomcat's lib directory and Java's lib > (or lib/ext) directories and just using WEB-INF/lib. > > > It has to be some classpath mismatch(java -jar bootstrap.jar start works > > fine) but I can't find what. The libraries in this app are bit > complicated. > > There is custom tomcat realm for authentication (this is the thing why is > > some libraries located in tomcat\lib) > > That's fine: if you have custom authentication, go ahead and put that in > Tomcat's lib directory. > > > some custom listeners and so on. > > Unless you are configuring these listeners at the top-level (like within > , or ), your listeners will be loaded by your > web application's ClassLoader, and so the classes can be in > WEB-INF/classes or WEB-INF/lib (in JAR files, of course). > > > I > > need to override somehow the jaxb1 api which I'm using for older custom > > component in application. > > You can put your JAXB classes into your webapp. Webapp ClassLoaders are > guarantees to load their classes locally (that is, from WEB-INF/lib) > before asking the parent ClassLoader to load the class. Note that this > is exactly the opposite of the way most ClassLoaders work. But, it's > mandated so that things like what you want to do actually work. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAkoNgu4ACgkQ9CaO5/Lv0PDt/QCgu1T7kLnurlRMRlRyyKnOP1TO > W6sAn2I5ZoONrIOvKR0NE6G0nigorfyQ > =C1m+ > -END PGP SIGNATURE- > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Difference between running bootstrap.jar and catalina.bat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan, On 5/15/2009 1:25 AM, Jan Horký wrote: > I got the following error: > > 15.5.2009 7:10:16 > com.sun.xml.ws.transport.http.servlet.WSServletContextListener > contextInitialized > SEVERE: WSSERVLET11: failed to parse runtime descriptor: > java.lang.VerifyError: (class: com/sun/xml/ws/model/AbstractSEIModelImpl, > method: createJAXBContext signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;) > Incompatible argument to function java.lang.VerifyError: (class: > com/sun/xml/ws/model/AbstractSEIModelImpl, method: createJAXBContext > signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;) Incompatible argument > to function You have mismatched your libraries: you have a .class file that is trying to call something like createJAXBContext(FooType) and the function available is actually createJABXContext(BarType). You need to make sure that the libraries used to compile your code are the same as those used to run it. All the libraries your application needs to run should be in your webapp's WEB-INF/lib directory. Try removing everything you added to Tomcat's lib directory and Java's lib (or lib/ext) directories and just using WEB-INF/lib. > It has to be some classpath mismatch(java -jar bootstrap.jar start works > fine) but I can't find what. The libraries in this app are bit complicated. > There is custom tomcat realm for authentication (this is the thing why is > some libraries located in tomcat\lib) That's fine: if you have custom authentication, go ahead and put that in Tomcat's lib directory. > some custom listeners and so on. Unless you are configuring these listeners at the top-level (like within , or ), your listeners will be loaded by your web application's ClassLoader, and so the classes can be in WEB-INF/classes or WEB-INF/lib (in JAR files, of course). > I > need to override somehow the jaxb1 api which I'm using for older custom > component in application. You can put your JAXB classes into your webapp. Webapp ClassLoaders are guarantees to load their classes locally (that is, from WEB-INF/lib) before asking the parent ClassLoader to load the class. Note that this is exactly the opposite of the way most ClassLoaders work. But, it's mandated so that things like what you want to do actually work. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoNgu4ACgkQ9CaO5/Lv0PDt/QCgu1T7kLnurlRMRlRyyKnOP1TO W6sAn2I5ZoONrIOvKR0NE6G0nigorfyQ =C1m+ -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Difference between running bootstrap.jar and catalina.bat
Hi, I got the following error: 15.5.2009 7:10:16 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.VerifyError: (class: com/sun/xml/ws/model/AbstractSEIModelImpl, method: createJAXBContext signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;) Incompatible argument to function java.lang.VerifyError: (class: com/sun/xml/ws/model/AbstractSEIModelImpl, method: createJAXBContext signature: ()Lcom/sun/xml/bind/api/JAXBRIContext;) Incompatible argument to function at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:215) at com.sun.xml.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:322) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:188) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:467) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:108) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3764) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4216) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022) at org.apache.catalina.core.StandardHost.start(StandardHost.java:736) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:448) at org.apache.catalina.core.StandardServer.start(StandardServer.java:700) at org.apache.catalina.startup.Catalina.start(Catalina.java:552) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433) 15.5.2009 7:10:16 org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart It has to be some classpath mismatch(java -jar bootstrap.jar start works fine) but I can't find what. The libraries in this app are bit complicated. There is custom tomcat realm for authentication (this is the thing why is some libraries located in tomcat\lib) some custom listeners and so on. I need to override somehow the jaxb1 api which I'm using for older custom component in application. I appreciate your time, thanks for answer, Jan. On Thu, May 14, 2009 at 8:56 PM, Christopher Schultz < ch...@christopherschultz.net> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Jan, > > On 5/14/2009 5:05 AM, Jan Horký wrote: > > Hi, thank you for replay. > > > > I tried to set various options in strartup.bat but It didn't work. It > > worked only if I ran "java -jar bootstrap.jar start" command from > > commnad line in tomcat\bin\. The thing which I'm interested in is > > which options (variables) are used when I start Tomcat this way (java > > -jar boot...). Than I can try to set service (windows registry, good > > to know, thx) same way as it's set when I'm using bootstrap class to > > tomcat run. > > When you say it "doesn't work", what /does/ happen? Log files? Console > output? > > I suspect you've messed-up Tomcat's lib directory and there are odd > dependencies not being fulfilled. You shouldn't have put anything into > Java's lib directory. You should probably also not have put anything > into Tomcat's lib directory. You should deploy the application-specific > JAR files into the webapp's WEB-INF/lib directory. > > - -chris > -BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.9 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > >
Re: Difference between running bootstrap.jar and catalina.bat
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jan, On 5/14/2009 5:05 AM, Jan Horký wrote: > Hi, thank you for replay. > > I tried to set various options in strartup.bat but It didn't work. It > worked only if I ran "java -jar bootstrap.jar start" command from > commnad line in tomcat\bin\. The thing which I'm interested in is > which options (variables) are used when I start Tomcat this way (java > -jar boot...). Than I can try to set service (windows registry, good > to know, thx) same way as it's set when I'm using bootstrap class to > tomcat run. When you say it "doesn't work", what /does/ happen? Log files? Console output? I suspect you've messed-up Tomcat's lib directory and there are odd dependencies not being fulfilled. You shouldn't have put anything into Java's lib directory. You should probably also not have put anything into Tomcat's lib directory. You should deploy the application-specific JAR files into the webapp's WEB-INF/lib directory. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.9 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkoMaXUACgkQ9CaO5/Lv0PC5HACgqpYBYbdDf5NqJEDo7ZHrc+FX +8cAoJ0vvB65bJuxdis/m2NecvD/ev/W =hETv -END PGP SIGNATURE- - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org
Re: Difference between running bootstrap.jar and catalina.bat
Hi, thank you for replay. I tried to set various options in strartup.bat but It didn't work. It worked only if I ran "java -jar bootstrap.jar start" command from commnad line in tomcat\bin\. The thing which I'm interested in is which options (variables) are used when I start Tomcat this way (java -jar boot...). Than I can try to set service (windows registry, good to know, thx) same way as it's set when I'm using bootstrap class to tomcat run. Thanks for answer. Jan On Thu, May 14, 2009 at 10:31 AM, André Warnier wrote: > Jan Horkı wrote: > >> Hi, >> >> I have problem with running my app. When I run Tomcat 5.5 | 6.0 by java >> -jar >> bootstrap.jar start It works fine, but when I try run it by catalina.bat >> or >> install as servise I got some class found problems. >> >> Shortly... Some features of application is based on jaxb1 and I need there >> web servise which is based on jwsdp2 (jaxb2). I put some jars to app/lib, >> some to tomcat/lib and some to java/lib and it works with java -jar >> bootstrap.jar start, but not as service. >> >> Hi. > > When you run Tomcat as a service under Windows, you are really running the > program "TOMCAT_DIR/bin/tomcat5.exe". This is a "wrapper" program which > includes what is needed to run as a Windows Service (catch "start/stop > service" events etc..). This wrapper program, in turn, runs the java jvm, > and this java jvm runs Tomcat. > > When you start Tomcat via the "startup.bat" script, you are not using this > wrapper program. You run the java jvm directly, and it runs Tomcat. > > Ok so far ? > > When you run Tomcat from the startup.bat script, there are a number of > "environment values" which are set by the startup script, before starting > the java jvm. Example : JAVA_OPTS, CATALINA_HOME, etc.. > > When you run the Service wrapper "TOMCAT_DIR/bin/tomcat5.exe", these > parameters are not set via environment values. Instead they are in the > Windows Registry. > To modify these parameters, there exists another program, named > "TOMCAT_DIR/bin/tomcat5w.exe", which is a Windows GUI program that you can > run, and which allows you to set the startup parameters. > > Try it, and see if that already answers some of your questions. > > > - > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > >
Re: Difference between running bootstrap.jar and catalina.bat
Jan Horký wrote: Hi, I have problem with running my app. When I run Tomcat 5.5 | 6.0 by java -jar bootstrap.jar start It works fine, but when I try run it by catalina.bat or install as servise I got some class found problems. Shortly... Some features of application is based on jaxb1 and I need there web servise which is based on jwsdp2 (jaxb2). I put some jars to app/lib, some to tomcat/lib and some to java/lib and it works with java -jar bootstrap.jar start, but not as service. Hi. When you run Tomcat as a service under Windows, you are really running the program "TOMCAT_DIR/bin/tomcat5.exe". This is a "wrapper" program which includes what is needed to run as a Windows Service (catch "start/stop service" events etc..). This wrapper program, in turn, runs the java jvm, and this java jvm runs Tomcat. When you start Tomcat via the "startup.bat" script, you are not using this wrapper program. You run the java jvm directly, and it runs Tomcat. Ok so far ? When you run Tomcat from the startup.bat script, there are a number of "environment values" which are set by the startup script, before starting the java jvm. Example : JAVA_OPTS, CATALINA_HOME, etc.. When you run the Service wrapper "TOMCAT_DIR/bin/tomcat5.exe", these parameters are not set via environment values. Instead they are in the Windows Registry. To modify these parameters, there exists another program, named "TOMCAT_DIR/bin/tomcat5w.exe", which is a Windows GUI program that you can run, and which allows you to set the startup parameters. Try it, and see if that already answers some of your questions. - To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org