Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JAX-WS Service Will Not Deploy Correctly

 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I've created a web service that works fine locally under Tomcat 6 and Tomcat 7, but when I try to deploy it to Tomcat 5.5, it just doesn't deploy.

The Tomcat Error log isn't very helpful since Googling the error doesn't lead to any great insights. The problem appears to be creating the EntityManager. I've tried moving that jar file to the Tomcat "shared" folder, but that made no difference.

Unless there's a clear solution, my next step would be to just upgrade Tomcat to version 6 or 7 on the server, but that's a non-trivial effort given our applications.

Has anyone run into this problem and can suggest a workaround or fix?

Thanks in advance,

-mike

SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.NoSuchFieldError: TRACE
java.lang.NoSuchFieldError: TRACE
at org.jboss.logging.Log4jLogger.translate(Log4jLogger.java:64)
at org.jboss.logging.Log4jLogger.doLog(Log4jLogger.java:44)
at org.jboss.logging.Logger.trace(Logger.java:128)
at org.hibernate.ejb.internal.EntityManagerMessageLogger_$logger.trace (EntityManagerMessageLogger_$logger.java:431)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:323)
at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:56)
at dao.ZipCodeDaoImpl.setupObjects(ZipCodeDaoImpl.java:80)
at dao.ZipCodeDaoImpl.<init>(ZipCodeDaoImpl.java:31)
at service.ZipCodeService.<init>(ZipCodeService.java:19)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at com.sun.xml.ws.api.server.InstanceResolver.createNewInstance(InstanceResolver.java:168)
at com.sun.xml.ws.api.server.InstanceResolver.createDefault(InstanceResolver.java:163)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:232)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:133)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:97)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
at org.apache.catalina.core.StandardService.start(StandardService.java:450)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
 
Mike London
Ranch Hand
Posts: 1192
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SOLVED!

The issue was twofold. Why the problems didn't happen on the local machine in three versions of Tomcat (including the same Tomcat 5 version that was on the Unix deployment box) is a mystery.

Problem 1. I had an old version of log4j.jar in my Tomcat 5 shared lib folder.

This was confusing since I no longer think to look there in current versions of Tomcat. Once I updated log4j to the current version, then I got the exception that it couldn't create the EntityManagerFactory. Ahhh, progress! Finally, an error that is helpful (1 day and counting...)

Looking at this a bit further, it was saying something about the MySQL dialect not being specified, so ...

Problem 2. Issue in persistence.xml

Updated the persistence.xml file with this:

<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>

And, viola, I finally had a WSDL with no errors in catalina.out.

This was a nasty one for sure since the error logs weren't initially helpful and it took a couple hours of searching before I saw the obscure posting about log4j, something my project isn't even yet using. And, of course, everything worked perfectly locally.

Hope this resolution follow-up helps somebody.

- mike
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic