[Installation, Configuration & DEPLOYMENT] CLASSPATH problem?
by Bogus Exception
I'm having trouble with errors like the following:
15:44:17,680 INFO [DefaultEndpointRegistry] register: jboss.ws:
context=gmsTest,endpoint=HelloWorld
15:44:17,787 INFO [WSDLFilePublisher] WSDL published to: file:/usr/java/
jboss-5.0.1.GA/server/default/data/wsdl/gmsTest.jar/HelloWorldService3425215985790724981.wsdl[i](listed
below)[/i]
15:44:17,802 INFO [TomcatDeployment] deploy, ctxPath=/gmsTest
15:44:17,820 WARN [config] Unable to process deployment descriptor for
context '/gmsTest'
16:02:35,127 ERROR [[HelloWorld]] Servlet.service() for servlet HelloWorld
threw exception
java.lang.NoClassDefFoundError: Could not initialize class
javax.xml.soap.SOAPException
at javax.xml.soap.SOAPFactory.newInstance(SOAPFactory.java:96)
[...]
The web service is as simple as it can be, as I have yet to have a single
web service work:
package gms.ws;
import javax.jws.*;
import javax.jws.soap.SOAPBinding;
import javax.ejb.Stateless;
@Stateless
@WebService(name="HelloWorld")
@SOAPBinding(style = SOAPBinding.Style.RPC)
public class HelloWorld {
public String echo(String sInput){
sInput += "!!!";
}
public int addOne(int iInput){
return iInput + 1;
}
}
When a web service is accessed. I'm trying to run jboss via eclipse 3.4.2,
but have a sneaking suspicion that I don't have jboss configured to load the
correct jars, from the right directories, in the right order. If this is the
case, then I need to know how to adjust the classes/paths loaded by jboss
from eclipse.
When I run jboss from start.sh (64 bit linux), the CLASSPATH shown in the
console output is not the same as the shell it is running from. It has only
a few directories, while the shell (environment) has everything.
Can anyone tell me whether this kind of error is due to jboss not finding
the classes it needs, or am I writing web services incorrectly?
TIA!
pat
:)
"You see, the Boyz II Men's room is flooded. 'Cause Busta Rhymes went in to
take a Master P but he got the Runs D.M.C. and had some Heavy D. And now
there's Funky Cold Medina everywhere!" -Thurgood Stubbs
17 years
[JNDI/Naming/Network] - access ejb frm a standalone java client:java.lang.ClassNotFo
by yhqian99
Hello All,
I am using MyEclipse5.5 + JBOSS to develop a stateless HelloEJB, after deployment, I can see the deployed bean from http://localhost:8080/jmx-console/.
Then I use a standalone java client to access the EJB, but get the error of "javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]"
Here is my code:
package com;
import javax.ejb.Stateless;
@Stateless
public class HelloEJB implements HelloEJBLocal, HelloEJBRemote
{
public HelloEJB()
{
}
public String sayHello(String name)
{
return "Welcome, " + name + ", I am a stateless Session Bean";
}
}
package com;
import javax.ejb.Local;
@Local
public interface HelloEJBLocal
{
public String sayHello(String name);
}
package com;
import javax.ejb.Remote;
@Remote
public interface HelloEJBRemote
{
public String sayHello(String name);
}
I have set the jbossall-client.jar to my java build path, is there anything I missed? Any help are highly apprieciated.
Yhqian
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221728#4221728
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221728
17 years