[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [cosmos-dev] questions on new annontation code
|
Hi Joel,
I have partially solved the problem.
The context-root is defined in .settings\org.eclipse.wst.common.component
in the web project.
You can see this line in the file:
<property name="context-root"
value="cosmos"/>
I may have set this value when creating
the web project.
However, the annotation code seems to
pick up the context root from the display-name value of the web.xml. So
after I matched up the two values to "cosmos", the code is now
behaving differently, which suggests the EPR is now reachable as more specific
soap faults are received.
The logic for determining the context-root
is a potential bug.
I have problem understanding the logic
in warmUpMuse method:
try
{
... Lines ommtited here....
EndpointReference epr = new
EndpointReference(addressURI);
ServiceGroupClient sg = new
ServiceGroupClient(epr);
//
// ping SG,
wait a few seconds, then check for members
// that were
added by the simulation factory
//
System.out.println("Pinging
Muse to initialize the endpoint...");
sg.getResourcePropertyDocument(); <--
exception is thrown here
System.out.println("Waiting
10 seconds while simulation creates WS-resources...");
}catch(SoapFault
s){
//We're
expecting a "Destination Unreachable" error here...
if(!WsaConstants.DESTINATION_UNREACHABLE_FAULT_QNAME.equals(s.getSubCode())){
s.printStackTrace();
<-- stacktrace
is printed here
}
}catch(Throwable
t){
t.printStackTrace();
}finally{
WebWSDMBindingFactory.getDefault().statusChanged(WebWSDMBindingFactory.getDefault(),
StatusChangeListener.STATUS.AVAILABLE);
}
Are you trying to initialize the endpoint
here by invoking a method of the endpoint? Why are you expecting
a destination unreachable fault? Does that mean that the 2nd println
"waiting 10 seconds" should never be executed? I don't
see logic that ask the thread to wait for 10 seconds.
The problem I have now is that I'm not
getting a destination unreachable fault. (not sure if it's because
it's reachable...) It's complaining about my wsdl files saying the
RelationshipPortType
portType does not exist, which puzzles me because I can see the portType
in the wsdl file. (see the stacktrace below.)
Also, which can cause the 404 error
for the 2nd error (the NPE problem) ?
Stacktrace:
java.lang.RuntimeException:
[ID = 'PortTypeNotFound'] The WSDL file 'D:/wtp-201/cosmos_j2ee/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/org.eclipse.cosmos.example.mdr.web/WEB-INF/classes/wsdl/WSDM-MUWS-Part2-1_1.wsdl'
does not have a portType named RelationshipPortType.
at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.getWsdlOperations(SimpleResourceDescriptor.java:375)
at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.createCapabilityDefinitions(SimpleResourceDescriptor.java:84)
at
org.apache.muse.core.descriptor.SimpleResourceDescriptor.load(SimpleResourceDescriptor.java:401)
at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.createResourceDefinitions(SimpleDeploymentDescriptor.java:78)
at
org.apache.muse.core.descriptor.SimpleDeploymentDescriptor.load(SimpleDeploymentDescriptor.java:177)
at
org.apache.muse.core.platform.AbstractIsolationLayer.initialize(AbstractIsolationLayer.java:152)
at
org.apache.muse.core.platform.mini.MiniServlet.createIsolationLayer(MiniServlet.java:55)
at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:69)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at
java.lang.Thread.run(Thread.java:595)
Jan 29, 2008 5:45:27 PM org.apache.catalina.core.StandardWrapperValve
invoke
SEVERE: Servlet.service() for servlet
ApacheMuseServlet threw exception
java.lang.NullPointerException
at
org.apache.muse.core.platform.mini.MiniIsolationLayer.handleRequest(MiniIsolationLayer.java:87)
at
org.apache.muse.core.platform.mini.MiniServlet.doPost(MiniServlet.java:84)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:870)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:685)
at
java.lang.Thread.run(Thread.java:595)
[Fatal Error] :6:184: The element type
"HR" must be terminated by the matching end-tag "</HR>".
org.apache.muse.ws.addressing.soap.SoapFault:
The element type "HR" must be terminated by the matching end-tag
"</HR>".
at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:298)
at
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
at
org.apache.muse.ws.resource.remote.WsResourceClient.getResourcePropertyDocument(WsResourceClient.java:146)
at
org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.warmUpMuse(WSDMServiceInitializer.java:133)
at
org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.access$1(WSDMServiceInitializer.java:92)
at
org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer$2.run(WSDMServiceInitializer.java:72)
at
java.lang.Thread.run(Thread.java:595)
Exception in thread "Thread-1"
java.lang.NullPointerException
at
org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.launchWarmUpMuse(WSDMServiceInitializer.java:84)
at
org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.access$0(WSDMServiceInitializer.java:65)
at
org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer$1.run(WSDMServiceInitializer.java:48)
at
java.lang.Thread.run(Thread.java:595)
Thanks,
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382
"Hawkins, Joel"
<Joel.Hawkins@xxxxxxxxxxxxx>
Sent by: cosmos-dev-bounces@xxxxxxxxxxx
01/29/2008 05:42 PM
Please respond to
Cosmos Dev <cosmos-dev@xxxxxxxxxxx> |
|
To
| "Cosmos Dev" <cosmos-dev@xxxxxxxxxxx>
|
cc
|
|
Subject
| RE: [cosmos-dev] questions on new annontation
code |
|
The 404 is the reason for the
latter error.
This feels familiar – is there
someplace I can get your test case? Where’s your web.xml?
Here’s what I’m running with
– you’ll notice that nothing like org.eclipse.cosmos.example.mdr.web
appears. Everything gets
mapped to the muse servlet:
<?xml
version="1.0"
encoding="UTF-8"?>
<web-app
id="WebApp_ID"
version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>test.cosmos.me.web</display-name>
<context-param>
<param-name>CosmosWebPort</param-name>
<param-value>8080</param-value>
</context-param>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<listener>
<listener-class>
test.cosmos.me.web.context.TestInitializer
</listener-class>
</listener>
<servlet>
<display-name>Apache
Muse Servlet</display-name>
<servlet-name>ApacheMuseServlet</servlet-name>
<servlet-class>org.apache.muse.core.platform.mini.MiniServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ApacheMuseServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
</web-app>
The contents of this e-mail are intended for the named addressee only.
It contains information that may be confidential. Unless you are the named
addressee or an authorized designee, you may not copy or use it, or disclose
it to anyone else. If you received it in error please notify us immediately
and then destroy it.
From: cosmos-dev-bounces@xxxxxxxxxxx [mailto:cosmos-dev-bounces@xxxxxxxxxxx]
On Behalf Of Hubert H Leung
Sent: Tuesday, January 29, 2008 3:55 PM
To: cosmos-dev@xxxxxxxxxxx
Subject: [cosmos-dev] questions on new annontation code
Hi Joel,
I'm moving the discussion to the mailing list so it's more visible.
With the patch you sent me this morning, I was able to run the Example
MDR with the new annotation code in OSGi environment. That's good
progress. Thanks.
Now, I'm moving the code to the J2EE environment, and I'm getting two problems.
It first fails in the line right after printing "Pinging Muse to initialize
the endpoint...", where it tries to get resource properties from service
group.
[Fatal Error] :1:1031: The element type "HR" must be terminated
by the matching end-tag "</HR>".
org.apache.muse.ws.addressing.soap.SoapFault: The element type "HR"
must be terminated by the matching end-tag "</HR>".
at org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:298)
at org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
at org.apache.muse.ws.resource.remote.WsResourceClient.getResourcePropertyDocument(WsResourceClient.java:146)
at org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.warmUpMuse(WSDMServiceInitializer.java:133)
at org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.access$1(WSDMServiceInitializer.java:92)
at org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer$2.run(WSDMServiceInitializer.java:72)
at java.lang.Thread.run(Thread.java:595)
Here is the EPR it tries to use:
<wsa:EndpointReference xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsa:Address>http://9.26.191.247:8080/org.eclipse.cosmos.example.mdr.web/services/Relationships</wsa:Address>
</wsa:EndpointReference>
It may have to do with the context name of the webapp. The red part
above. I see this name in web.xml. Is it also configured elsewhere?
Or do you think the problem is caused by something else?
The second failure is in line 84 of WSDMServiceInitializer.
I'm getting a NPE since ResourceRouter.getRouterInstance()
is null.
Here is the stacktrace:
Exception in thread "Thread-1" java.lang.NullPointerException
at org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.launchWarmUpMuse(WSDMServiceInitializer.java:84)
at org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer.access$0(WSDMServiceInitializer.java:65)
at org.eclipse.cosmos.me.management.wsdm.web.WSDMServiceInitializer$1.run(WSDMServiceInitializer.java:48)
at java.lang.Thread.run(Thread.java:595)
Your help would be appreciated.
Thanks,
_________________________
Hubert Leung
IBM Toronto Lab
hkyleung@xxxxxxxxxx
905-413-3382
_______________________________________________
cosmos-dev mailing list
cosmos-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/cosmos-dev