-
1. Re: Extra slash '/' in the URL
asoldano Aug 30, 2011 6:13 AM (in response to mohanpotturi)Can you share more info on the deployment and exception you get?
-
2. Re: Extra slash '/' in the URL
mohanpotturi Aug 30, 2011 9:16 AM (in response to asoldano)Thank you Alessio for the response. Please see the attached logs from JBoss 7 and JBoss 6.1.0. I have two webservices in our app. One is EJB based (packaged inside the EJB jar) and the other one is POJO based (packaged inside a war). They both are packaged indise a EAR file that is deployed in JBoss. I do not have any problem with EJB based service (WmsService). It is the POJO based service (UploadService) that got messed up as far as the URL is concerned. If you open the JBoss 6 log file and search for 'UploadService' you will see the deployment info for this service including the URL. Apparently the deployment info for JBoss 7 also the same but it does not work in 7 as it is not able to complete the deployment process.
Here is the web.xml contents relating to the POJO service:
<!-- Upload Users & Certificates web service -->
<servlet>
<servlet-name>UploadService</servlet-name>
<servlet-class>com.crown.infolink.web.ws.upload.UploadUsersNCerts</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UploadService</servlet-name>
<url-pattern>/upload/UploadServices</url-pattern>
</servlet-mapping>
Am I missing anything here? Appreciate your help.
Mohan
-
JBoss7.txt.zip 5.1 KB
-
JBoss6.txt.zip 9.7 KB
-
-
3. Re: Extra slash '/' in the URL
asoldano Aug 30, 2011 10:20 AM (in response to mohanpotturi)The problem seems to be in the context-root for the jse endpoint being an empty string. That's the case for both AS6 and AS7 afaics from the logs; AS7 throws an exception because it has an additional component that relies on the endpoint context-root creating an AS7 MSC service name.
So, the actual issue is in the context root being empty. Can you share any descriptor / configuration you have at ear leve (perhaps an application.xml ) that might influence that? Also, how is you packaged app at the end? I assume you have infolinkApp.ear which contains infolink-ejb.jar and infolink-web.war. What about descriptors in the ear? Do you also have a jboss-web.xml descriptor controlling the context root in the war archive?
-
4. Re: Extra slash '/' in the URL
mohanpotturi Aug 30, 2011 11:29 AM (in response to asoldano)Alessio,
Your assumption about the contents
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd"
version="6">
<display-name>InfoLink Software Application</display-name>
<module>
<ejb>infolink-ejb.jar</ejb>
</module>
<module>
<web>
<web-uri>infolink-web.war</web-uri>
<context-root>/</context-root>
</web>
</module>
</application>
As you can see, our context root is / and we wanted it at root. It used to work just fine in NATIVE stack. Therefore I am inclined to believe that it is CXF vs NATIVE issue. Is it possible to have context root for the application at root level (/) and a separate context root (/upload ) for the web sevices? Is so, how do I set that up? Appreciate your help.
Mohan
-
5. Re: Extra slash '/' in the URL
asoldano Aug 31, 2011 2:32 AM (in response to mohanpotturi)1 of 1 people found this helpfulOK, the application.xml explains to me where that "/" comes from.
I've created https://issues.jboss.org/browse/JBWS-3342 for the bug, you can monitor that if you want; it's scheduled for the next major release, should be done by the time AS 7.1 goes final.
In the mean time, as a workaround, you can consider splitting the infolink-web.war (if doable) into two wars, one for the ws endpoints only and the other one for the rest of the web app. Then you set "/upload" as context root for the ws endpoint war.
Thanks for the feedback, very much appreciated.
-
6. Re: Extra slash '/' in the URL
mohanpotturi Aug 31, 2011 9:03 AM (in response to asoldano)Thank you Alessio. Will keep an eye on that. Splitting webservices piece involves a lot of rehashing so we would rather not go that route. In the mean time, is it possible to replace CXF stack with native on AS7? If so how do I do that?
Mohan
-
7. Re: Extra slash '/' in the URL
asoldano Aug 31, 2011 9:21 AM (in response to mohanpotturi)I see...
Regarding native on AS7, it's currently possible (might not be the case in the future); you need to download jbossws-native sources and install against AS 7 (ant -Djboss700.home=... deploy-jboss700)
-
8. Re: Extra slash '/' in the URL
mohanpotturi Aug 31, 2011 9:52 AM (in response to asoldano)Tried that and ran into issues. What am I doing wrong?
C:\jbossws-native>ant -Djboss700.home="C:\Program Files\jboss-as-7.0.0.Final" deploy-jboss700
Buildfile: C:\jbossws-native\build.xmltarget-jboss700:
os-init:
mvn-settings:
[mkdir] Created dir: C:\jbossws-native\modules\dist\target
[exec] [INFO] Scanning for projects...
[exec] [ERROR] The build could not read 1 project -> [Help 1]
[exec] [ERROR]
[exec] [ERROR] The project org.jboss.ws.native:jbossws-native:4.0.0-SNAPSHOT (C:\jbossws-native\pom.xml) has 1 er
ror
[exec] [ERROR] Non-resolvable parent POM: Could not find artifact org.jboss.ws:jbossws-parent:pom:1.0.10-SNAPSH
OT and 'parent.relativePath' points at wrong local POM @ line 24, column 11 -> [Help 2]
[exec] [ERROR]
[exec] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[exec] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
[exec] [ERROR]
[exec] [ERROR] For more information about the errors and possible solutions, please read the following articles:
[exec] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException
[exec] [ERROR] [Help 2] http://cwiki.apache.org/confluence/display/MAVEN/UnresolvableModelException -
9. Re: Extra slash '/' in the URL
mohanpotturi Aug 31, 2011 3:07 PM (in response to asoldano)Never mind Alessio. After going thru your document about mavenization of the build process and setting up the settings.xml file properly, I am able to build it now. Appreciate your help.
Mohan