[ 
https://issues.apache.org/jira/browse/TUSCANY-2074?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12578603#action_12578603
 ] 

Sandeep Raman commented on TUSCANY-2074:
----------------------------------------

Thanks for the  suggestion which helped me remove the errors.

There is no specific reason that both the RunTimeServlet and default.jsp 
creating the domain instance. Only one of them will be used, You can delete the 
default.jsp itself.

The error coming up in the console is i guess due to the promote attribute 
being used. I think the source code which i have attached should enable you to 
guide me regarding that.

Now i would ask you to comment of this line in the RunTimeServlet:
                   //   boolean flag =  Compose.start("TwoWS.composite");
                   //   po.println("......output of calling the granular 
service is ::   " + flag);

I now visit the URI specified in binding.ws uri 
"http://localhost:8080/TwoWSService";  where i am supposed to see the component 
service but i am unable to. Can you have a look at this.


I have attached the source code of all the files being used. I am getting the 
error in console as:


.....RunTime Composite Started
Mar 14, 2008 9:55:30 AM org.apache.tuscany.sca.assembly.builder.impl.CompositeBu
ilderImpl$1 problem
WARNING: Reference not found for component reference: HelloWorldServiceComponent
/stock
Mar 14, 2008 9:55:30 AM org.apache.tuscany.sca.assembly.builder.impl.CompositeBu
ilderImpl$1 problem
WARNING: Promoted component reference not found: HelloWorldServiceComponent/Hell
oWorldService
Mar 14, 2008 9:55:30 AM org.apache.tuscany.sca.assembly.builder.impl.CompositeBu
ilderImpl$1 problem
WARNING: Promoted component reference not found: StockServiceComponent/StockQuot
eService
....................Calling HelloWorldService
Injected helloWorldService
Called getGreetings
org.osoa.sca.ServiceUnavailableException: Service not found for component HelloW
orldServiceComponent reference helloWorldService (bindingURI=null operation=getG
reetings). Ensure that the composite containing the service is loaded and starte
d somewhere in the SCA domain and that if running in a remote node that the inte
rface of the target service marked as @Remotable
        at org.apache.tuscany.sca.binding.sca.impl.RuntimeSCAReferenceBindingPro
vider.createInvoker(RuntimeSCAReferenceBindingProvider.java:242)
        at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.addBindingInterc
eptor(RuntimeWireImpl.java:213)
        at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.initInvocationCh
ains(RuntimeWireImpl.java:155)
        at org.apache.tuscany.sca.core.assembly.RuntimeWireImpl.getInvocationCha
ins(RuntimeWireImpl.java:97)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.getInvoca
tionChain(JDKInvocationHandler.java:206)
        at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(JD
KInvocationHandler.java:140)
        at $Proxy24.getGreetings(Unknown Source)
        at helloworld.HelloWorldServiceComponent.getGreetings(HelloWorldServiceC
omponent.java:30)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.tuscany.sca.implementation.java.invocation.JavaImplementat
ionInvoker.invoke(JavaImplementationInvoker.java:105)
        at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.i
nvoke(PassByValueInterceptor.java:88)

> Component Service not coming up.
> --------------------------------
>
>                 Key: TUSCANY-2074
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2074
>             Project: Tuscany
>          Issue Type: Test
>          Components: Java SCA Tomcat Integration
>    Affects Versions: Java-SCA-1.1
>         Environment: Windows , Tomcat 5.5 , Apache tuscany 1.1 , Java 5.0
>            Reporter: Sandeep Raman
>            Priority: Critical
>             Fix For: Java-SCA-Next
>
>         Attachments: java.zip, TwoWS.war
>
>   Original Estimate: 72h
>  Remaining Estimate: 72h
>
> summary of the Issue:
> I have an issue with the component service not coming up. below mentioned 
> is my scenario.
> I have a JSP (default.jsp) which does the following:
> <%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%>
> <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> <%
>       SCADomain scaDomain = SCADomain.newInstance("RunTime.composite");
>       System.out.println("RunTime Composite Started");
> %>
> and the Runtime.composite is as follows:
>     <component name="TwoWSService">
>         <implementation.java class="eai.Compose" />
>         <service name="Compose">
>              interface="http://eai#wsdl.interface(TwoWSService)" /> 
>             <binding.ws uri="http://localhost:8080/TwoWSService"; />
>         </service>
>     </component>
> Now I create a war of all my Java classes , wsdl , composite files and 
> with the default.jsp as the default run target.
> This war gets deployed in tomcat and the jsp page comes up. It creates a 
> new instance of Runtime.composite too , but it doesnt seem to be starting 
> the
> component service which i have mentioned in the composite file : 
> <binding.ws uri="http://localhost:8080/TwoWSService"; />.
> ------------------------------------------------------------------------------------------------------------------------------------------------------
> Following Mails explain the scenario::
> > I see everything in console, like
> >
> > INFO: initContextPath: /TwoWS
> > INFO: Added Servlet mapping: /TwoWSService
> >
> > Even if i try to Run my low lying services which i am composing it Runs
> > fine and can see the output in the console..
> > The issue is the wsdl url which i need to publish and not able to find it
> > anywhere.
> >
> > As per the samples , in my case
> > http://localhost:8080/TwoWS/TwoWSService?wsdl should point to my wsdl, but
> > tht doesnt seem to exist
> >
> > Regards
> > Sandeep
> >
> >
> > "ant elder" <[EMAIL PROTECTED]> wrote on 03/11/2008 05:03:44 PM:
> >
> > > A difference between this and the calculator sample is the way the jsp
> > gets
> > > the SCADomain object, the Tuscany jsp samples do:
> > > <%
> > >    SCADomain scaDomain = (SCADomain) application.getAttribute("
> > > org.apache.tuscany.sca.SCADomain");
> > >    CalculatorService calculatorService =
> > > (CalculatorService)scaDomain.getService(CalculatorService.class,
> > > "CalculatorServiceComponent");
> > > %>
> > >
> > > whereas this code does:
> > > <%
> > >      SCADomain scaDomain = SCADomain.newInstance("RunTime.composite");
> > >      System.out.println("RunTime Composite Started");
> > > %>
> > > I've never tried that so i don't know if it will work.
> > >
> > > If Tuscany is activating the WS endpoint you should see the messages on
> > the
> > > tomcat console about it, for example, with the calculator ws sample you
> > see:
> > >
> > > INFO: ContextPath: /sample-calculator-ws-webapp
> > > and
> > > INFO: Added Servlet mapping: /AddServiceComponent
> > >
> > > so you can add those and you tomcat host and port to get
> > >
> > > http://localhost:8080//sample-calculator-ws-webapp/AddServiceComponent
> > >
> > > You can test thats working by appending ?wsdl to that and url and
> > entering
> > > it in a browser which should return the wsdl document for the service.
> > >
> > > If you don't see the above messages then something is going wrong and
> > the WS
> > > endpoint is not being registered correctly.
> > >
> > >    ...ant
> > >
> > > On Tue, Mar 11, 2008 at 11:07 AM, Sandeep Raman <[EMAIL PROTECTED]>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I have done pretty much in the same way as the sample.
> > > > i need to see my wsdl , my component service which is running . I am
> > not
> > > > able to figure out the URL for the wsdl file.
> > > >
> > > > I am stuck up there, since all my external requests need this wsdl URL
> > to
> > > > process, any help or suggestion will be highly appreciated
> > > >
> > > > Regards
> > > > Sandeep Raman
> > > >
> > > > "ant elder" <[EMAIL PROTECTED]> wrote on 03/11/2008 02:28:13 PM:
> > > >
> > > > > On Tue, Mar 11, 2008 at 3:38 AM, Sandeep Raman
> > <[EMAIL PROTECTED]>
> > > > > wrote:
> > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I have an issue with the component service not coming up. below
> > > > mentioned
> > > > > > is my scenario.
> > > > > >
> > > > > > I have a JSP (default.jsp) which does the following:
> > > > > >
> > > > > > <%@ page import="org.apache.tuscany.sca.host.embedded.SCADomain"%>
> > > > > > <%@ page contentType="text/html;charset=UTF-8" language="java" %>
> > > > > > <%
> > > > > >      SCADomain scaDomain =
> > SCADomain.newInstance("RunTime.composite");
> > > > > >      System.out.println("RunTime Composite Started");
> > > > > > %>
> > > > > >
> > > > > > and the Runtime.composite is as follows:
> > > > > >
> > > > > >    <component name="TwoWSService">
> > > > > >        <implementation.java class="eai.Compose" />
> > > > > >        <service name="Compose">
> > > > > >             
> > > > > > interface="http://eai#wsdl.interface(TwoWSService)<http://eai#wsdl.interface%28TwoWSService%29>
> > <
> > > http://eai#wsdl.interface%28TwoWSService%29>
> > > > <
> > > > > http://eai#wsdl.interface%28TwoWSService%29>"
> > > > > > />
> > > > > >            <binding.ws uri="http://localhost:8080/TwoWSService"; />
> > > > > >        </service>
> > > > > >    </component>
> > > > > >
> > > > > >
> > > > > > Now I create a war of all my Java classes , wsdl , composite files
> > and
> > > > > > with the default.jsp as the default run target.
> > > > > > This war gets deployed in tomcat and the jsp page comes up. It
> > creates
> > > > a
> > > > > > new instance of Runtime.composite too , but it doesnt seem to be
> > > > starting
> > > > > > the
> > > > > > component service which i have mentioned in the composite file :
> > > > > > <binding.ws uri="http://localhost:8080/TwoWSService"; />.
> > > > > >
> > > > > > What could be wrong in this, Can you please guide me.
> > > > > >
> > > > > > Regards
> > > > > > Sandeep Raman.
> > > > > >
> > > > >
> > > > > It could be there is a dependency missing but its hard to tell from
> > just
> > > > > that description. Are there any odd messages produce on the tomcat
> > > > console
> > > > > or logs? One thing is having the jsp create the SCADomain is not the
> > > > normal
> > > > > way to start the runtime, have you seen how the calculator-ws sample
> > > > does
> > > > > this? There's two significant bits - the config in the web.xml [1]
> > and
> > > > the
> > > > > code in the jsp [2].
> > > > >
> > > > >    ...ant
> > > > >
> > > > > [1]
> > > > > https://svn.apache.
> > > > > org/repos/asf/incubator/tuscany/java/sca/samples/calculator-ws-
> > > > > webapp/src/main/webapp/WEB-INF/web.xml
> > > > > [2]
> > > > > https://svn.apache.
> > > > > org/repos/asf/incubator/tuscany/java/sca/samples/calculator-ws-
> > > > > webapp/src/main/webapp/calc.jsp
> > > >
> > > > > ForwardSourceID:NT00006F7A
> > > > =====-----=====-----=====
> > > > Notice: The information contained in this e-mail
> > > > message and/or attachments to it may contain
> > > > confidential or privileged information. If you are
> > > > not the intended recipient, any dissemination, use,
> > > > review, distribution, printing or copying of the
> > > > information contained in this e-mail message
> > > > and/or attachments to it are strictly prohibited. If
> > > > you have received this communication in error,
> > > > please notify us by reply e-mail or telephone and
> > > > immediately and permanently delete the message
> > > > and any attachments. Thank you
> > > >
> > > >
> > > >
> >
> > > ForwardSourceID:NT00007012
> > =====-----=====-----=====
> > Notice: The information contained in this e-mail
> > message and/or attachments to it may contain
> > confidential or privileged information. If you are
> > not the intended recipient, any dissemination, use,
> > review, distribution, printing or copying of the
> > information contained in this e-mail message
> > and/or attachments to it are strictly prohibited. If
> > you have received this communication in error,
> > please notify us by reply e-mail or telephone and
> > immediately and permanently delete the message
> > and any attachments. Thank you
> >
> >
> >
> ForwardSourceID:NT0000721A    

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to