Well, you don't override the default initialize() in your capability
class, and that method doesn't do much of anything, so I'm guessing the
problem is with the loading of the InitialContext class by the
classloader. At the time initialize() is called, you haven't executed any
JNDI-related code yet, but the classloader has to load the class when it
loads MyCapability. My initial searches online lead me to believe that
something is off with your JBoss/JNDI configuration; one way to tell is to
answer the following questions:
1. Does the checkRabbatt() code run in a simple servlet (independent of
Muse/Axis/etc.)?
2. If so, is there anything in web.xml or other configuration files that
is in your Muse-based WAR files?
Thanks,
Dan
Thomas Vogel <[EMAIL PROTECTED]> wrote on 01/04/2007 01:52:56 PM:
>
> Hello,
>
> I have a mused based application being built with the help of the IBM
> Build to Manage Toolkit for WSDM. This app contains the following class
> from which I try to look up an EJB3.0. The muse based app is deployed as
> an WAR to JBoss, and the beans are deployed as an EJB-Module.
>
> public class MyCapability extends AbstractWsResourceCapability
> implements IMyCapability
> {
> private static final QName[] _PROPERTIES = new QName[]
> {
> new QName(NAMESPACE_URI, "rabatt", PREFIX)
> };
>
> public QName[] getPropertyNames()
> {
> return _PROPERTIES;
> }
>
> private int _rabatt = 0;
>
> public int getRabatt()
> {
> return _rabatt;
> }
>
> public void setRabatt(int param0)
> {
> _rabatt = param0;
> }
>
> public void changeRabatt(int param0) throws Exception {
> System.out.println("changeRabatt");
> _rabatt = param0;
>
> Context ctx = new InitialContext();
> Ticketshop shop = (Ticketshop) ctx.lookup("TicketshopBean/remote");
> shop.setRabatt(param0);
>
> }
> }
>
> The lookup with InitialContext does not work. Does anybody know what's
> wrong or why it does not work? I've read that anything you can do in the
> J2EE programming model should be achievable within Muse-based
applications.
>
> Thanks,
> Thomas
>
> The Client gets the following Response-Message:
>
> [CLIENT TRACE] SOAP envelope contents (incoming):
>
> <soapenv:Envelope
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"
> xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <soapenv:Header>
> <wsa:ReplyTo>
>
>
<wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
> </wsa:ReplyTo>
> <wsa:From>
>
>
<wsa:Address>http://localhost:8080/wsdmcode/services/ticketshop</wsa:Address>
> </wsa:From>
> <wsa:FaultTo>
>
>
<wsa:Address>http://localhost:8080/wsdmcode/services/ticketshop</wsa:Address>
> </wsa:FaultTo>
>
> <wsa:MessageID>urn:uuid:1495E29A72C128C24E11679349692472</wsa:MessageID>
>
> <wsa:Action>http://www.ibm.com/new_file/ChangeRabattRequest</wsa:Action>
> <wsa:RelatesTo
> wsa:RelationshipType="wsa:Reply">uuid:13370cb3-9355-7680-
> b5f1-1eb305ba85cb</wsa:RelatesTo>
> </soapenv:Header>
> <soapenv:Body>
> <soap:Fault xmlns:soap="http://www.w3.org/2003/05/soap-envelope"
> xmlns:tns="http://ws.apache.org/axis2">
> <soap:Code>
> <soap:Value>soap:Receiver</soap:Value>
> </soap:Code>
> <soap:Reason>
> <soap:Text>$Proxy119</soap:Text>
> </soap:Reason>
> </soap:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
> org.apache.muse.ws.addressing.soap.SoapFault: $Proxy119
> at
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
> at
>
org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:213)
> at
>
de.uniba.lspi.www.ticketshop.MyServiceProxy.changeRabatt(MyServiceProxy.java:39)
> at test.Test.main(Test.java:21)
>
> JBoss prints the following stack trace:
>
> 19:22:50,078 ERROR [STDERR] java.lang.RuntimeException: $Proxy119
> 19:22:50,078 ERROR [STDERR] at
> com.ibm.www.new_file.MyCapability.initialize(MyCapability.java:78)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.muse.core.SimpleResource.initializeCapabilities(SimpleResource.java:296)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.muse.core.SimpleResource.initialize(SimpleResource.java:261)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.muse.ws.resource.impl.SimpleWsResource.initialize(SimpleWsResource.java:213)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.muse.core.routing.RouterFilePersistence.
> reloadResource(RouterFilePersistence.java:139)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.muse.core.AbstractFilePersistence.
> reloadResources(AbstractFilePersistence.java:393)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.muse.core.AbstractFilePersistence.reload(AbstractFilePersistence.java:334)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.muse.core.routing.SimpleResourceRouter.
> initialize(SimpleResourceRouter.java:248)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.muse.core.platform.AbstractIsolationLayer.
> initialize(AbstractIsolationLayer.java:176)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.muse.core.platform.axis2.AxisIsolationLayer.
> setOperationContext(AxisIsolationLayer.java:138)
> 19:22:50,078 ERROR [STDERR] at
> sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 19:22:50,078 ERROR [STDERR] at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 19:22:50,078 ERROR [STDERR] at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 19:22:50,078 ERROR [STDERR] at
> java.lang.reflect.Method.invoke(Method.java:585)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.axis2.engine.DependencyManager.
> configureBusinessLogicProvider(DependencyManager.java:50)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver.
> invokeBusinessLogic(RawXMLINOutMessageReceiver.java:79)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.
> receive(AbstractInOutSyncMessageReceiver.java:37)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:480)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.axis2.transport.http.HTTPTransportUtils.
> processHTTPPostRequest(HTTPTransportUtils.java:284)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:136)
> 19:22:50,078 ERROR [STDERR] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
> 19:22:50,078 ERROR [STDERR] at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:252)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.
> doFilter(ApplicationFilterChain.java:173)
> 19:22:50,078 ERROR [STDERR] at
>
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.
> internalDoFilter(ApplicationFilterChain.java:202)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.catalina.core.ApplicationFilterChain.
> doFilter(ApplicationFilterChain.java:173)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
> 19:22:50,078 ERROR [STDERR] at
> org.jboss.web.tomcat.security.SecurityAssociationValve.
> invoke(SecurityAssociationValve.java:175)
> 19:22:50,078 ERROR [STDERR] at
>
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
> 19:22:50,078 ERROR [STDERR] at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.
> processConnection(Http11BaseProtocol.java:664)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
> 19:22:50,078 ERROR [STDERR] at
>
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
> 19:22:50,078 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
> 19:22:50,078 ERROR [STDERR] Caused by: java.lang.ClassCastException:
> $Proxy119
> 19:22:50,078 ERROR [STDERR] at
> com.ibm.www.new_file.MyCapability.initialize(MyCapability.java:72)
> 19:22:50,078 ERROR [STDERR] ... 39 more
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]