MyEclipse Forums
This thread has been locked & this forum has been archived.
Please post new topics to Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
View previous topic Printable version Log in to check your private messages View next topic
Author Message
Mork
Post subject: Simple Web Service will Not Deploy to Latest GlassFish 3  PostPosted: Mar 30, 2010 - 01:59 PM
Veteran Member
Veteran Member


Joined: Dec 09, 2004
Posts: 607

When trying to deploy a simple Web Service using MyEclipse 8.5 to Glassfish 3 (latest version with all updates as of 3-30-2010), I get the error stack below (bottom line: deploy failed).

The Web Service deploys to Tomcat, but has a NullPointerException due to the @Resource injection problem I keep trying to get your help with (as this 'may' be a problem with the deployed MyEclipse jar files).

I created the simple web service using MyEclipse tools.

I've already sent Genuitec the sample code (service, client, and even deployed Tomcat application) for the NullPointerException problem on Tomcat I've yet to hear back about.

This is getting more than a little frustrating...

Thanks.

-- M

[#|2010-03-30T08:11:40.061-0400|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=24;_ThreadName=Thread-1;|Exception while deploying the app
java.lang.IllegalStateException: Servlet [HelloServletDelegate] and Servlet [HelloServlet] have the same url pattern: [/HelloServletService]at org.glassfish.apf.AnnotationInfo@de8aa5
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:478)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:420)
at com.sun.enterprise.deployment.archivist.Archivist.readRestDeploymentDescriptors(Archivist.java:396)
at com.sun.enterprise.deployment.archivist.Archivist.openWith(Archivist.java:259)
at com.sun.enterprise.deployment.archivist.ApplicationFactory.openWith(ApplicationFactory.java:222)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:145)
at org.glassfish.javaee.core.deployment.DolProvider.load(DolProvider.java:78)
at com.sun.enterprise.v3.server.ApplicationLifecycle.loadDeployer(ApplicationLifecycle.java:612)
at com.sun.enterprise.v3.server.ApplicationLifecycle.setupContainerInfos(ApplicationLifecycle.java:554)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:262)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:141)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:573)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:459)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:391)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:376)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:195)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: Servlet [HelloServletDelegate] and Servlet [HelloServlet] have the same url pattern: [/HelloServletService]at org.glassfish.apf.AnnotationInfo@de8aa5
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:360)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:368)
at org.glassfish.apf.impl.AnnotationProcessorImpl.processAnnotations(AnnotationProcessorImpl.java:282)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:188)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:129)
at com.sun.enterprise.deployment.archivist.Archivist.processAnnotations(Archivist.java:581)
at com.sun.enterprise.deployment.archivist.Archivist.readAnnotations(Archivist.java:433)
... 24 more
Caused by: java.lang.IllegalArgumentException: Servlet [HelloServletDelegate] and Servlet [HelloServlet] have the same url pattern: [/HelloServletService]
at com.sun.enterprise.deployment.WebBundleDescriptor.addWebComponentDescriptor(WebBundleDescriptor.java:360)
at org.glassfish.webservices.annotation.handlers.WebServiceHandler.processAnnotation(WebServiceHandler.java:412)
at org.glassfish.apf.impl.AnnotationProcessorImpl.process(AnnotationProcessorImpl.java:337)
... 30 more
|#]
 
 View user's profile Send private message  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Apr 03, 2010 - 12:20 AM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

Mork,

We researched this issue and determined that it's an error in your application (not MyEclipse) that can be corrected by either updating the the xml or the java source.

You can change the endpoint implementation to be:
Code:

<?xml version = "1.0"?>
<endpoints version="2.0"
   xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
   <endpoint name="HelloServletPort"
      implementation="servletws.HelloServletDelegate"
      url-pattern="/HelloServletPort">
   </endpoint></endpoints>

OR
You can change the java files to pass the context from delegate class to the POJO class (attached zip).

Moving this from Bugs to Web Services Forum.

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Mork
Post subject:   PostPosted: Apr 03, 2010 - 01:49 AM
Veteran Member
Veteran Member


Joined: Dec 09, 2004
Posts: 607

Hi Scott,

How can it not be a bug in MyEclipse when MyEclipse generated these files?

I used the MyEclipse wizards to create everything using the simplest of applications.

Look forward to your reply on this point.

In any case, your "fixed" xml file appears to me to be identical to the one I sent you:

<?xml version = "1.0"?>
<endpoints version="2.0"
xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
<endpoint name="HelloServletPort"
implementation="servletws.HelloServletDelegate"
url-pattern="/HelloServletPort">
</endpoint></endpoints>

M
 
 View user's profile Send private message  
Reply with quote Back to top
support-scott
Post subject:   PostPosted: Apr 05, 2010 - 03:49 PM
Moderator
Moderator


Joined: May 06, 2003
Posts: 6761

M,

Quote:

How can it not be a bug in MyEclipse when MyEclipse generated these files?

I think we can agree that MyEclipse can't be expected to generate a working web service based on *any* input and that there will be limitations to any generation technology. In this case, MyEclipse expects you to provide it with a POJO from which to generate a web service. However, you didn't do that. You gave it a Java class that already contained an @webservice and @resource tag, thereby making it some sort of a non-functioning web service hybrid. As a result, the generation could not take this input and figure out what was intended to create a working webservice. If you remove the @webservice and @resource tags then then generation will succeed. If you then want to use the @resource tag, you should place it in the generated delegate class. That's what is done in the example I attached. Going forward, we're looking into enhancing our error reporting so that it is quite clear when you've provided input that is not compliant with what is expected so that such confusion can be avoided in the future.

_________________
--Scott
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Mork
Post subject:   PostPosted: Apr 05, 2010 - 04:22 PM
Veteran Member
Veteran Member


Joined: Dec 09, 2004
Posts: 607

Thanks Scott. Better MyEclipse errors is something I've been requesting for a long time now.

In any case, to address your main comment. I've gotten this Web Service to work fine under Tomcat now (with the @Resource working).

The "revised" code you sent me wasn't correct for my needs.

Thanks.

M
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits