calling ejb on another app server

2005-04-07 Thread Eric J Kaplan
Does anyone have any experience getting a servlet that calls an ejb on a
different application server to work, running tomcat 5.0.28?

I know we got this to work under 3.x a while ago.

 

At this point I feel like we've tried everything but we always get that name
ejb is not bound in this context. I even tried changing my jndi.properties
to point to an invalid host, and although when I print out the environment
for the context just before looking up the bean it indeed says that the
naming provider url is foo:1066, I don't get a communication exception, I
get that the ejb context is not bound. My suspicion is it is going against a
jndi server running within tomcat that doesn't have the ejb context bound.

 

Help would be appreciated, we've been floundering for a couple of days.

 

Regards

 

Eric



RE: calling ejb on another app server

2005-04-07 Thread Eric J Kaplan
Yes it is. I changed it in my jndi.properties file to see if I would get a
different error. It was originally 1099.

Given that, and the fact that you have this working (we are also using
jboss) do you have any other ideas? I assume you are on tomcat 5x or
greater?

My setup is pretty vanilla. I'm sure it's just a configuration switch, but
not sure which one.

Regards

Eric

-Original Message-
From: Neil Upfalow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 1:30 PM
To: 'Tomcat Users List'
Subject: RE: calling ejb on another app server

We do tomcat (servlet) to remote jboss (EJB).
Isn't JNDI usually bound to 1099 ?
Also,  is usually a critical port. Some ISPs block it. Remapping to
 usually solves this problem.

Hope it helps.

Sincerely,
Neil Upfalow
 

-Original Message-
From: Eric J Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 1:23 PM
To: 'Tomcat Users List'
Subject: calling ejb on another app server

Does anyone have any experience getting a servlet that calls an ejb on a
different application server to work, running tomcat 5.0.28?

I know we got this to work under 3.x a while ago.

 

At this point I feel like we've tried everything but we always get that
name
ejb is not bound in this context. I even tried changing my
jndi.properties
to point to an invalid host, and although when I print out the
environment
for the context just before looking up the bean it indeed says that the
naming provider url is foo:1066, I don't get a communication exception,
I
get that the ejb context is not bound. My suspicion is it is going
against a
jndi server running within tomcat that doesn't have the ejb context
bound.

 

Help would be appreciated, we've been floundering for a couple of days.

 

Regards

 

Eric



-
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]



RE: calling ejb on another app server

2005-04-07 Thread Eric J Kaplan
That's the strange thing because I print out the environment of the context
being used at the time the failure occurs and it does seem to be taking it
from my jndi.properties file! Of course, simply printing out the context is
different than what the context may ACTUALLY be doing.

Regards

Eric

-Original Message-
From: N G [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 1:54 PM
To: Tomcat Users List
Subject: Re: calling ejb on another app server

If you are not getting some communication exception when you change
the port number
to the wrong port, it tells me that your jndi.properties are being ignored.

As you pointed out, it's probably returning an instance of Tomcat readonly
JNDI.

I suggest you load your jndi.properties explicitely use new
InitialContext(properties) constructor. This should for sure force it
to try to connect to the proper JNDI provider.

HTH,
NG.

On Apr 7, 2005 1:35 PM, Eric J Kaplan [EMAIL PROTECTED] wrote:
 Yes it is. I changed it in my jndi.properties file to see if I would get a
 different error. It was originally 1099.
 
 Given that, and the fact that you have this working (we are also using
 jboss) do you have any other ideas? I assume you are on tomcat 5x or
 greater?
 
 My setup is pretty vanilla. I'm sure it's just a configuration switch, but
 not sure which one.
 
 Regards
 
 Eric
 
 -Original Message-
 From: Neil Upfalow [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 07, 2005 1:30 PM
 To: 'Tomcat Users List'
 Subject: RE: calling ejb on another app server
 
 We do tomcat (servlet) to remote jboss (EJB).
 Isn't JNDI usually bound to 1099 ?
 Also,  is usually a critical port. Some ISPs block it. Remapping to
  usually solves this problem.
 
 Hope it helps.
 
 Sincerely,
 Neil Upfalow
 
 -Original Message-
 From: Eric J Kaplan [mailto:[EMAIL PROTECTED]
 Sent: Thursday, April 07, 2005 1:23 PM
 To: 'Tomcat Users List'
 Subject: calling ejb on another app server
 
 Does anyone have any experience getting a servlet that calls an ejb on a
 different application server to work, running tomcat 5.0.28?
 
 I know we got this to work under 3.x a while ago.
 
 At this point I feel like we've tried everything but we always get that
 name
 ejb is not bound in this context. I even tried changing my
 jndi.properties
 to point to an invalid host, and although when I print out the
 environment
 for the context just before looking up the bean it indeed says that the
 naming provider url is foo:1066, I don't get a communication exception,
 I
 get that the ejb context is not bound. My suspicion is it is going
 against a
 jndi server running within tomcat that doesn't have the ejb context
 bound.
 
 Help would be appreciated, we've been floundering for a couple of days.
 
 Regards
 
 Eric
 
 -
 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]
 


-
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]



RE: calling ejb on another app server

2005-04-07 Thread Eric J Kaplan
Neil

I'll give it a try, though note that we have been using jboss for a few
years and have plenty of standalone apps communicating fine with jboss
through the same api as that used by the servlet.

Regards

Eric

-Original Message-
From: Neil Upfalow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 1:53 PM
To: 'Tomcat Users List'
Subject: RE: calling ejb on another app server

Another critical jboss element is setting jnp rmi port to something,
here it's 34159
I set it in jboss/server/default/conf/jboss-service.xml
attribute name=Properties
  invokerServletPath=http://localhost:8080/invoker/JMXInvokerServlet
jnp.rmiPort=34159
/attribute

like that.

You may also need to make jboss bind to your WAN ip.
Add these options in run.bat:
-Djava.rmi.server.hostname=JBOSS-WAN-STATIC-IP
-Djava.rmi.server.useLocalHostname=false



Sincerely,
Neil Upfalow
 

-Original Message-
From: Eric J Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 1:36 PM
To: 'Tomcat Users List'
Subject: RE: calling ejb on another app server

Yes it is. I changed it in my jndi.properties file to see if I would get
a
different error. It was originally 1099.

Given that, and the fact that you have this working (we are also using
jboss) do you have any other ideas? I assume you are on tomcat 5x or
greater?

My setup is pretty vanilla. I'm sure it's just a configuration switch,
but
not sure which one.

Regards

Eric

-Original Message-
From: Neil Upfalow [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 1:30 PM
To: 'Tomcat Users List'
Subject: RE: calling ejb on another app server

We do tomcat (servlet) to remote jboss (EJB).
Isn't JNDI usually bound to 1099 ?
Also,  is usually a critical port. Some ISPs block it. Remapping to
 usually solves this problem.

Hope it helps.

Sincerely,
Neil Upfalow
 

-Original Message-
From: Eric J Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 07, 2005 1:23 PM
To: 'Tomcat Users List'
Subject: calling ejb on another app server

Does anyone have any experience getting a servlet that calls an ejb on a
different application server to work, running tomcat 5.0.28?

I know we got this to work under 3.x a while ago.

 

At this point I feel like we've tried everything but we always get that
name
ejb is not bound in this context. I even tried changing my
jndi.properties
to point to an invalid host, and although when I print out the
environment
for the context just before looking up the bean it indeed says that the
naming provider url is foo:1066, I don't get a communication exception,
I
get that the ejb context is not bound. My suspicion is it is going
against a
jndi server running within tomcat that doesn't have the ejb context
bound.

 

Help would be appreciated, we've been floundering for a couple of days.

 

Regards

 

Eric



-
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]


-
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]



jndi.properties file and classpath

2005-04-06 Thread Eric J Kaplan
We are using tomcat 5.0.28 and our servlet needs to load jndi.properties
from a jndi.properties file in our WEB-INF/classes directory but it seems to
be getting it from elsewhere and so our servlet, which needs to call a bean
on a separate application server instance (in this case jboss) fails because
its jndi context it pointing it at, I assume, the jndi instance running in
tomcat. I even tried appending this classes directory to the front of the
classpath when starting within the script (shiver) but that didn't work.
What do I need to do?

 

Regards

 

Eric 

 



RE: jndi.properties file and classpath

2005-04-06 Thread Eric J Kaplan
Perhaps this was missed the first time. I think the answer should be fairly
simple. How do I get my servlet to pull in my jndi.properties file, which
right now is in the WEB-INF/classes directory, instead of whatever one it
seems to be pulling in that is directing it to tomcat?

Regards

Eric

-Original Message-
From: Eric J Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, April 06, 2005 11:18 AM
To: 'Tomcat Users List'
Subject: jndi.properties file and classpath

We are using tomcat 5.0.28 and our servlet needs to load jndi.properties
from a jndi.properties file in our WEB-INF/classes directory but it seems to
be getting it from elsewhere and so our servlet, which needs to call a bean
on a separate application server instance (in this case jboss) fails because
its jndi context it pointing it at, I assume, the jndi instance running in
tomcat. I even tried appending this classes directory to the front of the
classpath when starting within the script (shiver) but that didn't work.
What do I need to do?

 

Regards

 

Eric 

 



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



NoClassDefFoundError: org/apache/avalon/framework/logger/Logger

2005-04-05 Thread Eric J Kaplan
All

 

I recently downloaded tomcat version 5.0.28 and created a webapp in the
webapps directory which looks as follows:

 

tomcat_home

webapps

armanta-war

WEB-INF

lib

armanta.jar

 

armanta.jar has two classes in it, my servlet and a class used by the
servlet.

 

My web.xml is shown below.

 

When I go to run my servlet, I get the following exception report and can't
explain why, since my install of tomcat is pretty vanilla. I know
historically there have been issues related to conflicts between jars, but
in my case I've only added two class files into the mix. Can someone please
help?

 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

javax.servlet.ServletException: Error instantiating servlet class
com.armanta.servlets.ReportServlet
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
java.lang.Thread.run(Thread.java:536)

root cause 

java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
java.lang.Class.getConstructor0(Class.java:1762)
java.lang.Class.newInstance0(Class.java:276)
java.lang.Class.newInstance(Class.java:259)
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
java.lang.Thread.run(Thread.java:536)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.28 logs.

 

 

?xml version=1.0 encoding=ISO-8859-1?

 

!DOCTYPE web-app 

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 

http://java.sun.com/dtd/web-app_2_3.dtd;

 

web-app

 

 

!-- General description of your web application --

 

display-nameArmanta Report Web Application/display-name

description

 Consists of a servlet to send report commands to.

/description

 

 

servlet

servlet-nameArmantaServlet/servlet-name

servlet-classcom.armanta.servlets.ReportServlet/servlet-class

/servlet

 

servlet-mapping

servlet-nameArmantaServlet/servlet-name

url-pattern/ReportServlet/url-pattern

/servlet-mapping

 

/web-app

 

Eric J. Kaplan

Armanta, Inc.

350 Mt. Kemble Ave.

Morristown, NJ 07960

 



RE: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger

2005-04-05 Thread Eric J Kaplan
Fyi, I am running java 1.4.1_07 on windows XP

-Original Message-
From: Eric J Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 2:44 PM
To: tomcat-user@jakarta.apache.org
Subject: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger

All

 

I recently downloaded tomcat version 5.0.28 and created a webapp in the
webapps directory which looks as follows:

 

tomcat_home

webapps

armanta-war

WEB-INF

lib

armanta.jar

 

armanta.jar has two classes in it, my servlet and a class used by the
servlet.

 

My web.xml is shown below.

 

When I go to run my servlet, I get the following exception report and can't
explain why, since my install of tomcat is pretty vanilla. I know
historically there have been issues related to conflicts between jars, but
in my case I've only added two class files into the mix. Can someone please
help?

 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

javax.servlet.ServletException: Error instantiating servlet class
com.armanta.servlets.ReportServlet
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
java.lang.Thread.run(Thread.java:536)

root cause 

java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
java.lang.Class.getConstructor0(Class.java:1762)
java.lang.Class.newInstance0(Class.java:276)
java.lang.Class.newInstance(Class.java:259)
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118
)
 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:705)
 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:683)
java.lang.Thread.run(Thread.java:536)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.28 logs.

 

 

?xml version=1.0 encoding=ISO-8859-1?

 

!DOCTYPE web-app 

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 

http://java.sun.com/dtd/web-app_2_3.dtd;

 

web-app

 

 

!-- General description of your web application --

 

display-nameArmanta Report Web Application/display-name

description

 Consists of a servlet to send report commands to.

/description

 

 

servlet

servlet-nameArmantaServlet/servlet-name

servlet-classcom.armanta.servlets.ReportServlet/servlet-class

/servlet

 

servlet-mapping

servlet-nameArmantaServlet/servlet-name

url-pattern/ReportServlet/url-pattern

/servlet-mapping

 

/web-app

 

Eric J. Kaplan

Armanta, Inc.

350 Mt. Kemble Ave.

Morristown, NJ 07960

 



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



RE: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger

2005-04-05 Thread Eric J Kaplan
Reynir

That does help, although it is what I suspected. I did indeed have a ref to
this lib that I wasn't aware of. The reason I was confused initially thought
was that armanta.jar has a classloader Manifest that references a bunch of
libs, this Avalon one included, that are expected to be in an ext directory
that is off the lib directory. It seems that this manifest classpath is
ignored though? Anyway, I moved the libs up next to Armanta.jar in the lib
dir and it works fine.

Thanks

Eric

-Original Message-
From: reynir [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 3:53 PM
To: Tomcat Users List
Subject: Re: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger

hi,

This is a simple class not found exception, that would be fixed if you
add the avalon jars into WEB-INF/lib
The classloader can not find : org.apache.avalon.framework.logger.Logger
This is a class that you are using in your aramanta application
(com.armanta.servlets.ReportServlet)
You must provide this class into the classpath to get this to work. Its
not to my knowledge a part of tomcat,
and even so, you should provide libraries your applications depend on
your self.  BTW. avalon project is closed, but I think you can download
those libraries. For logging I recomend log4J.

see : http://avalon.apache.org/

hope it helps
-reynir








Eric J Kaplan wrote:

Fyi, I am running java 1.4.1_07 on windows XP

-Original Message-
From: Eric J Kaplan [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 2:44 PM
To: tomcat-user@jakarta.apache.org
Subject: NoClassDefFoundError: org/apache/avalon/framework/logger/Logger

All

 

I recently downloaded tomcat version 5.0.28 and created a webapp in the
webapps directory which looks as follows:

 

tomcat_home

webapps

armanta-war

WEB-INF

lib

armanta.jar

 

armanta.jar has two classes in it, my servlet and a class used by the
servlet.

 

My web.xml is shown below.

 

When I go to run my servlet, I get the following exception report and can't
explain why, since my install of tomcat is pretty vanilla. I know
historically there have been issues related to conflicts between jars, but
in my case I've only added two class files into the mix. Can someone please
help?

 

type Exception report

message 

description The server encountered an internal error () that prevented it
from fulfilling this request.

exception 

javax.servlet.ServletException: Error instantiating servlet class
com.armanta.servlets.ReportServlet
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11
8
)
 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn
e
ction(Http11Protocol.java:705)
 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
v
a:683)
java.lang.Thread.run(Thread.java:536)

root cause 

java.lang.NoClassDefFoundError: org/apache/avalon/framework/logger/Logger
java.lang.Class.getDeclaredConstructors0(Native Method)
java.lang.Class.privateGetDeclaredConstructors(Class.java:1590)
java.lang.Class.getConstructor0(Class.java:1762)
java.lang.Class.newInstance0(Class.java:276)
java.lang.Class.newInstance(Class.java:259)
 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:11
8
)
 
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConn
e
ction(Http11Protocol.java:705)
 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja
v
a:683)
java.lang.Thread.run(Thread.java:536)

note The full stack trace of the root cause is available in the Apache
Tomcat/5.0.28 logs.

 

 

?xml version=1.0 encoding=ISO-8859-1?

 

!DOCTYPE web-app 

PUBLIC -//Sun Microsystems, Inc.//DTD Web Application 2.3//EN 

http://java.sun.com/dtd/web-app_2_3.dtd;

 

web-app

 

 

!-- General description of your web application --

 

display-nameArmanta Report Web Application/display-name

description

 Consists of a servlet to send report commands to.

/description

 

 

servlet

servlet-nameArmantaServlet/servlet-name

servlet-classcom.armanta.servlets.ReportServlet/servlet-class

/servlet

 

servlet-mapping

servlet-nameArmantaServlet/servlet-name

url-pattern/ReportServlet/url-pattern

/servlet-mapping

 

/web-app

 

Eric J. Kaplan

Armanta, Inc.

350 Mt. Kemble Ave.

Morristown, NJ 07960

jndi conflict?

2005-04-05 Thread Eric J Kaplan
All

 

When I initially run my servlet, it needs to communicate with a session bean
on the application server. In this case, our beans are running on a separate
instance of the jboss application server. It looks like, however, the jndi
lookups are going against tomcat, since even if jboss isn't running, instead
of getting a socket exception, we get Name ejb is not bound in this
Context. We are looking for a bean in the ejb context.

 

My guess is it is a classpath issue. I have a jndi.properties file in the
servlet-module/WEB-INF/classes directory which is correct. What else do I
need to do?

 

Regards

 

Eric