[Beginner's Corner] - Applet deployment problem
by nfteodoro
Ok, only now i noticed there is a beginner's corner, sorry about posting in another location in the forum. So, i'm going to repeat myself bu i have the following problem:
I have an applet which i want to deploy with jboss. the problem is i only can load the .html file, the applet is not loaded, and the error i get is that the classes are not found.
Everything works outside jboss but somehow it cannot find the class code.
Here's what i've done: I have a .html file and a classes directory (which contains the .class files for the applet).
I made a .war file with those 2 items.
I placed that .war file under <jboss path>server/default/deploy
i opened the file in the browser and i can see the html code but the applet is not loaded because it cannot find the classes. But why, if they are in the same directory(the .war file)?
Thanks for your help.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263456#4263456
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263456
16 years, 5 months
[JBoss Web Services Users] - javax.xml.rpc.soap.SOAPFaultException: does not contain oper
by gowri
Hi,
I am using JBOSS 5.1.0 GA as JBOSS App. server. I have created a simple webservice for getting string say "Hello". I could able to deploy the project as a war file and the generation of wsdl file is also fine.
When I run the client, I am getting this exception in the server side.
Pls. help me on this to find out where I am going wrong.
"javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://com.apr/helloworld}HelloWorldWSPort does not contain operation meta data for: {http://apr.com/}sayHello"
jboss-esb.xml
| <?xml version = "1.0" encoding = "UTF-8"?>
| <jbossesb
| xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml...">
| <providers>
| <jms-provider name="JBossMQ" connection-factory="ConnectionFactory">
| <jms-bus busid="myChannel">
| <jms-message-filter dest-type="QUEUE"
| dest-name="queue/ESBTestQueue" />
| </jms-bus>
| <jms-bus busid="MyEsbAwareChannel">
| <jms-message-filter dest-type="QUEUE"
| dest-name="queue/ESBTestQueue_ESBAware" />
| </jms-bus>
| </jms-provider>
| <jbr-provider name="JBR-Http" protocol="http" host="localhost">
| <jbr-bus busid="Http-1" port="9001" />
| </jbr-provider>
|
| </providers>
| <services>
|
| <service category="MyCateg" name="wsservice" description="Webservice">
| <listeners>
| <jms-listener name="helloWorld" busidref="MyEsbAwareChannel" />
| <jbr-listener name="Http-Gateway" busidref="Http-1" is-gateway="true" />
| </listeners>
| <actions>
| <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor">
| <property name="jbossws-endpoint" value="HelloWorldWS" />
| </action>
| </actions>
| </service>
|
|
| </services>
| </jbossesb>
|
HelloInterface.java
|
| package com.apr;
| import javax.jws.WebParam;
| import javax.jws.WebService;
| @WebService
| public interface HelloInterface {
|
| public String sayHello(@WebParam(name="message")String name);
| }
|
The implementation class
| package com.apr;
|
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebService;
|
| @WebService(name = "HelloWorldWS", targetNamespace="http://com.apr/helloworld")
| public class HelloWorldWS implements HelloInterface {
|
| @WebMethod
| public String sayHello(@WebParam(name="message") String message) {
| System.out.println("Hello World. Message=" + message);
| return "Hello World - " + message;
|
| }
|
|
| }
|
wsdl file
| <?xml version="1.0" encoding="UTF-8"?>
| <definitions name="HelloWorldWSService" targetNamespace="http://com.apr/helloworld" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://com.apr/helloworld" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
| <types>
| <xs:schema targetNamespace="http://com.apr/helloworld" version="1.0" xmlns:tns="http://com.apr/helloworld" xmlns:xs="http://www.w3.org/2001/XMLSchema">
| <xs:element name="sayHello" type="tns:sayHello"/>
| <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
| <xs:complexType name="sayHello">
| <xs:sequence>
| <xs:element minOccurs="0" name="message" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| <xs:complexType name="sayHelloResponse">
| <xs:sequence>
| <xs:element minOccurs="0" name="return" type="xs:string"/>
| </xs:sequence>
| </xs:complexType>
| </xs:schema>
| </types>
| <message name="HelloWorldWS_sayHello">
| <part name="sayHello" element="tns:sayHello">
| </part>
| </message>
| <message name="HelloWorldWS_sayHelloResponse">
| <part name="sayHelloResponse" element="tns:sayHelloResponse">
| </part>
| </message>
| <portType name="HelloWorldWS">
| <operation name="sayHello" parameterOrder="sayHello">
| <input message="tns:HelloWorldWS_sayHello">
| </input>
| <output message="tns:HelloWorldWS_sayHelloResponse">
| </output>
| </operation>
| </portType>
| <binding name="HelloWorldWSBinding" type="tns:HelloWorldWS">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="sayHello">
| <soap:operation soapAction=""/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
| <service name="HelloWorldWSService">
| <port name="HelloWorldWSPort" binding="tns:HelloWorldWSBinding">
| <soap:address location="http://127.0.0.1:8080/MyWS/HelloWorldWS"/>
| </port>
| </service>
| </definitions>
|
|
|
web.xml
| <?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>
| MyWS</display-name>
| <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>
| <servlet>
| <servlet-name>HelloWorldWS</servlet-name>
| <servlet-class>com.apr.HelloWorldWS</servlet-class>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>HelloWorldWS</servlet-name>
| <url-pattern>/HelloWorldWS</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
Client Code:
| package com.apr;
|
| import org.apache.cxf.interceptor.LoggingInInterceptor;
| import org.apache.cxf.interceptor.LoggingOutInterceptor;
| import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;
|
|
|
| public class Client {
| public static void main(String[] args) {
| JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
| factory.getInInterceptors().add(new LoggingInInterceptor());
| factory.getOutInterceptors().add(new LoggingOutInterceptor());
| factory.setServiceClass(HelloInterface.class);
| factory.setAddress("http://127.0.0.1:8080/MyWS/HelloWorldWS");
| HelloInterface client = (HelloInterface) factory.create();
|
| String reply = client.sayHello("Krishna");
| System.out.println("Server said: " + reply);
|
|
|
|
| }
| }
|
|
Exception from server log:
| 2009-11-02 11:10:49,052 INFO [org.jboss.wsf.framework.management.DefaultEndpointRegistry] (HDScanner) register: jboss.ws:context=MyWS,endpoint=HelloWorldWS
| 2009-11-02 11:10:49,161 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (HDScanner) deploy, ctxPath=/MyWS
| 2009-11-02 11:10:49,427 INFO [org.jboss.wsf.stack.jbws.WSDLFilePublisher] (HDScanner) WSDL published to: file:/D:/software/jboss-5.1.0.GA-jdk6/jboss-5.1.0.GA/server/default/data/wsdl/MyWS.war/HelloWorldWSService8985776581610665970.wsdl
| 2009-11-02 11:13:03,836 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] (http-127.0.0.1-8080-1) SOAP request exception
| org.jboss.ws.core.CommonSOAPFaultException: Endpoint {http://com.apr/helloworld}HelloWorldWSPort does not contain operation meta data for: {http://apr.com/}sayHello
| at org.jboss.ws.core.server.ServiceEndpointInvoker.getDispatchDestination(ServiceEndpointInvoker.java:476)
| at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:178)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:474)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:295)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:205)
| at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:131)
| at org.jboss.wsf.common.servlet.AbstractEndpointServlet.service(AbstractEndpointServlet.java:85)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:190)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:92)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
| at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Unknown Source)
|
|
Thanks
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263454#4263454
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263454
16 years, 5 months
[JNDI and Naming] - Class cast exception in Ejb Look up
by JinoAugustine
Hi friends,
Deploying one ejb with JBoss_4_2_2_GA and deploying well.
But while trying to look up it getting some exception like
java.lang.ClassCastException: $Proxy78 cannot be cast to stateless.CalculatorRemote
please help to identify the problem
is it ejb3 problem or JBoss version problem?
here is code
Remote
| package stateless;
| import java.math.*;
| import javax.ejb.Remote;
| import java.lang.annotation.*;
| @Remote
| public interface CalculatorRemote {
| public float add(float x, float y);
| public float subtract(float x, float y);
| public float multiply(float x, float y);
| public float division(float x, float y);
| }
|
and stateless bean
and lookup code
|
| public void jspInit() {
| try {
|
| InitialContext ic = new InitialContext();
| calculator = (CalculatorRemote) ic.lookup("example/CalculatorBean/remote");
| System.out.println("Loaded Calculator Bean");
|
| } catch (Exception ex) {
| e.printStackTrace ();
| }
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4263445#4263445
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4263445
16 years, 5 months