aspose file tools*
The moose likes Web Services and the fly likes Cannot deploy web service Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "Cannot deploy web service" Watch "Cannot deploy web service" New topic
Author

Cannot deploy web service

Eduardo Urias
Greenhorn

Joined: Jul 31, 2009
Posts: 4
Hello everybody!

I'm trying to deploy a web service created in java using eclipse on a JBoss server. When I create the web service, eclipse automatically deploys it, and that is fine, it works perfectly, but I cannot deploy the service by myself. I restart JBoss and then run java org.apache.axis.client.ClientAdmin deploy.wsdd, and this is what it says

WARNING: Unable to find required classes (javax.activation.DataHandler and j
avax.mail.internet.MimeMultipart). Attachment support is disabled.
Processing file deploy.wsdd
<Admin>Done processing</Admin>

I believe the warning shouldn't prevent the service from running, but it is not running!

Please tell me what can I do

Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
Welcome to JavaRanch.

Sounds like you're missing the Java Activation Framework jar file in the classpath; it's generally called activation-1.1.1.jar or some such.
Eduardo Urias
Greenhorn

Joined: Jul 31, 2009
Posts: 4
Thank you foir your help, but it didn't work =S, i added the activation framework and other libraries to the classpath, and still it doesn't work, this is what it says now

log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
Processing file deploy.wsdd
<Admin>Done processing</Admin>

Is there anything else I should do to deploy the web service?? I first restart jboss, the i run java org.apache.axis.client.AdminClient deploy.wss, on the deploy.wsdd file found inside the tmp folder of jboss (tmp\deploy\tmpXXXMyProject.ear-contents\MyProject-exp.war\WEB-INF\MyService\).

Is there anything else I should do? I'd like to know which commands eclipse runs when deploying the web service, because I works fine when I deploy it using eclipse, but I can't get it to work when I deploy it manually.

Please help, I'm desperate =S

Thanks
Eduardo Urias
Greenhorn

Joined: Jul 31, 2009
Posts: 4
I found an error on the JBoss console, this is what it says:

[WSDDDeployableItem] Unable to deploy typemapping: {http://mynamespace}MyClass
java.lang.ClassNotFoundException: MyClass
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDTypeMapping.getLanguageSpecificType(WSDDTypeMapping.java:183)
at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)
... it goes on, then
[WSDDDeployment] Ignoring non-fatal exception
org.apache.axis.deployment.wsdd.WSDDNonFatalException: java.lang.ClassNotFoundException: MyClass
java.lang.ClassNotFoundException: MyClass
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDTypeMapping.getLanguageSpecificType(WSDDTypeMapping.java:183)
... it goes on, and then:
org.apache.axis.deployment.wsdd.WSDDNonFatalException: java.lang.ClassNotFoundException: MyClass
java.lang.ClassNotFoundException: MyClass
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1355)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1201)
at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:160)
at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:100)
at org.apache.axis.deployment.wsdd.WSDDTypeMapping.getLanguageSpecificType(WSDDTypeMapping.java:183)
at org.apache.axis.deployment.wsdd.WSDDService.deployTypeMapping(WSDDService.java:542)

Is the same class the three times, again, I don't know why this fails, since eclipse deploys the webservice just fine, without any warnings or errors
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42951
    
  72
og4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.

These are just warnings, not errors. If you're unfamiliar with log4j then you can ignore them for the moment.

java.lang.ClassNotFoundException: MyClass

Is that class file where Axis can find it, like in WEB-INF/classes? Also, you should get in the habit of putting classes into packages; there are situations where using classes in the default package (meaning, not in any package) doesn't work.
Eduardo Urias
Greenhorn

Joined: Jul 31, 2009
Posts: 4
I found the error.

Eclipse creates a file named server-config.wsdd, which JBoss uses to determine the classpath and run the axis server and everything. The thing is that it doesn't put this file inside the WAR, it deploys it automatically and puts it in the tmp folder on JBoss, that's why it worked perfectly when I deployed de WS from eclipse, but didn't when I deployed manually. I just copied the server-config.wsdd file and put it in the WEB-INF folder inside the WAR and it worked!

Thanks for your help
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cannot deploy web service