axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James McCarthy" <jmccar...@symmetrysolutions.com>
Subject RE: Connecting to stateless Session EJB, Lookup error.
Date Mon, 18 Mar 2002 16:20:23 GMT
Eddie,

Are you sure you need to specify the path as a URL reference? If not you
would drop the file:// if you do need to specify a file URL then I believe
the proper way to do this is the following:

With Drive Specifier:

file:/C:/RestOfPath/file.name

Without Drive Specifier:

file:///RestOfPath/file.name

Jim

-----Original Message-----
From: Eddie Post [mailto:post2menow@hotmail.com]
Sent: Monday, March 18, 2002 7:07 AM
To: axis-user@xml.apache.org
Cc: namortaror@hotmail.com
Subject: Connecting to stateless Session EJB, Lookup error.


Hellu,

I am trying to connect to my EJB in Orion 1.5.4 through Apache Axis.
I configured everyting like in the mail that I found in the mailinglist:
http://marc.theaimsgroup.com/?l=axis-user&m=100879873023841&w=2

However, I do get the NamingException (see below) when my test-client tries
to invoke the EJB method.
Please some help or example ?

What I did:
1) deployed it with the deploy.xml below.
2) Put a EJB ref in the axis web.xml, see below.
3) Put a jndi.properties in the Axis WEB-INF dir, see below (also tried the
Axis META dir)
4) Put a class-path entry in the orion-web-xml file of axis, see below.
5) Put a library-path entry in the orion-application-xml file of axis, see
below.

Eddie


Note:
a) the jndi file works with a direct client.
b) Axis works with just one class.
c) In the mailing list example they use "file:///C:/...." (three slashes),
which isn't correct, not ??
d) In the mailing list example they use "location" in the orion-web.xml,
which I don't think is necessary, not ? (I never use it with my J2EE
applications). If I use it Orion gives an syntax error.

Librarypath entry in the orion-application.xml file:
------------
<library path="file://C:/Program
Files/Orion_apps/lib/java/Soap/axis/WEB-INF/jndi.properties" />
------------

Classpath entry in orion-web.xml:
----------
	<classpath path="file://C:/Program
Files/Orion_apps/lib/java/Soap/axis/WEB-INF/jndi.properties" />
-----------


jndi.properties file:
---------------
java.naming.factory.initial=com.evermind.server.ApplicationClientInitialCont
extFactory
java.naming.provider.url=ormi://localhost/sgs
java.naming.security.principal=user
java.naming.security.credentials=12345
---------------


EJB ref in web.xml of axis:
------------
	<ejb-ref>
		<description> User Manager of SGS </description>
		<ejb-ref-name>ejb/UserManager</ejb-ref-name>
		<ejb-ref-type>Session</ejb-ref-type>
		<home>nl.unwired.sgs.um.UserManagerHome</home>
		<remote>nl.unwired.sgs.um.UserManager</remote>
		<ejb-link>UserManager</ejb-link>
	</ejb-ref>
------------


deploy.xml:
-------------
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
	xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<service name="UserManager" provider="java:EJB">
	<parameter name="beanJndiName"  value="java:comp/env/ejb/UserManager"/>
	<parameter name="className" value="nl.unwired.sgs.um.UserManager"/>
	<parameter name="allowedMethods" value="getAllUsersFromAccount"/>
</service>
</deployment>
-------------


Soap error:
-------------
C:\samples\ed>java -cp .;axis.jar;log4j-core.jar;crimson.jar;jaxp.jar
ClientEjb 0
Exception in thread "main" javax.naming.NamingException: Error inst
antiating web-app JNDI-context: No location specified and no suitab
le instance of the type 'nl.unwired.sgs.um.UserManager' found for t
he ejb-ref ejb/UserManager
        at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAP
FaultBuilder.java:134)
        at org.apache.axis.encoding.DeserializationContext.endEleme
nt(DeserializationContext.java:671)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.j
ava:1528)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1
779)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.j
ava:1507)
        at org.apache.crimson.parser.Parser2.content(Parser2.java:1
779)
        at org.apache.crimson.parser.Parser2.maybeElement(Parser2.j
ava:1507)
        at org.apache.crimson.parser.Parser2.parseInternal(Parser2.
java:500)
        at org.apache.crimson.parser.Parser2.parse(Parser2.java:305
)
        at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderI
mpl.java:442)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:393)
        at org.apache.axis.encoding.DeserializationContext.parse(De
serializationContext.java:204)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java
:378)
        at org.apache.axis.client.Call.invoke(Call.java:1268)
        at org.apache.axis.client.Call.invoke(Call.java:1113)
        at org.apache.axis.client.Call.invoke(Call.java:1043)
        at org.apache.axis.client.ServiceClient.invoke(ServiceClien
t.java:456)
        at ClientEjb.main(ClientEjb.java:11)
-----------

_________________________________________________________________
Join the worldÂ’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


Mime
View raw message