Skip to main content

EJB remote deployed on GF 3.1 behind a NAT unaccessible

29 replies [Last post]
mauro2011
Offline
Joined: 2011-06-08
Points: 0

Glassfsih 3.1.2.2 the porblem it is not resolved!!!!!!!!!!

http://java.net/jira/browse/GLASSFISH-17147

from documentation:
http://docs.oracle.com/cd/E26576_01/doc.312/e24939/release-notes.htm#CHD...

but at:
http://java.net/jira/browse/GLASSFISH-17151
blaise gosselin it a proposed a solution.
Whi the engineer of oracle not correct the orb implementatio nfor glassfsih for resolve???

Please help me.
a patch or a solution for glassfsih future build?
mauro

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Xavier Callejas...
Offline
Joined: 2011-04-15
Points: 0

+1

Please help us.

On Jue 18 Oct 2012 10:14:00 forums@java.net escribió:
> Glassfsih 3.1.2.2 the porblem it is not resolved!!!!!!!!!!
> http://java.net/jira/browse/GLASSFISH-17147 [1] from documentation:
> http://docs.oracle.com/cd/E26576_01/doc.312/e24939/release-notes.htm#CHD...
> C but at: http://java.net/jira/browse/GLASSFISH-17151 [2] blaise gosselin it
> a proposed a solution. Whi the engineer of oracle not correct the orb
> implementatio nfor glassfsih for resolve??? Please help me. a patch or a
> solution for glassfsih future build? mauro
>
> [1] http://java.net/jira/browse/GLASSFISH-17147
> [2] http://java.net/jira/browse/GLASSFISH-17151

thezebulette
Offline
Joined: 2012-04-16
Points: 0

Hello

I have the same problem still .....

For me , it works in LAN , with no configuration on ORBVAAHost but doesn't work from outside .

If I change the ORBVAAHost to the public IP, and restart the server , then It works outside but doesn't inside the LAN .

I try all I can
(changing the etc/host , changing the IP in IOPP listener .... )

please help us making that stuff working ...

al130959
Offline
Joined: 2005-09-28
Points: 0

All,

as this has been a frequent complaint recently and I have done this successfully with version 2.1.1 in the past, let's see whether I can be of some help (or whether there indeed is a new bug in 3.x somewhere)...

Please note that I am a field guy and currently don't have access to an installation behind a firewall and/or NATing device right now, so I cannot check whether it still works as it should in recent releases, but to the best of my knowledge, the following approach worked fine since some SJS AS 8.2 patch level and is supposed to still work in GF v3.x:

Here is the public doc link about that:

http://docs.oracle.com/cd/E26576_01/doc.312/e24930/java-clients.htm#ghbpc

But please note that there is one pitfall about that: By setting the JVM-wide system properties

-Dcom.sun.corba.ee.ORBVAAHost=<em>public-IP-adress</em>
-Dcom.sun.corba.ee.ORBVAAPort=<em>public-port</em>
-Dcom.sun.corba.ee.ORBUserConfigurators.com.sun.corba.ee.impl.plugin.hwlb.VirtualAddressAgentImpl=dummy

as shown in the doc link, all client-side RMI/IIOP connections must go through the NATing device (which means that the instance you are using does no longer support non-NATed clients from the LAN): The problem is that there is an outbound ORB connection pool. You can see that the IIOP connections are reused and cache by setting specific ORB debug flags, such as the JVM option
-Dcom.sun.corba.ee.ORBDebug=transport,subcontract
In order to only affect the ORB instance dealing with a particular client that wishes to connect from outside a firewall/behind a NATing device, you need to to the following when creating the InitialContext:
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
env.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
env.put("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
env.put("org.omg.CORBA.ORBInitialHost","<em>public IP address of GF behind NATting device</em>"));
env.put("org.omg.CORBA.ORBInitialPort","<em>public port of GF behind NATting device</em>"));
env.put("com.sun.corba.ee.ORBVAAHost","<em>public IP address of GF behind NATting device</em>"));
env.put("com.sun.corba.ee.ORBVAAPort","<em>public port of GF behind NATting device</em>"));
env.put("com.sun.corba.ee.ORBUserConfigurators.com.sun.corba.ee.impl.plugin.hwlb.VirtualAddressAgentImpl","dummy");

The following property is optional and additionally switches off connection caching, such as e.g. is needed when your NATing device is a hardware loadbalancer or your firewall cuts off idle connections without sending a TCP/IP RST packet to inform the client the connection has been terminated:
env.put("com.sun.corba.ee.ORBUserConfigurators.com.sun.corba.ee.impl.plugin.hwlb.NoConnectionCacheImpl","dummy");
Each remote ORB call requires that a TCP/IP connection is created and destroyed when the NoConnectionCacheImpl option is used. By using it via the custom InitialContext properties approach, the impact of the NoConnectionCache option is limited to a specific InitialContext/ORB that is being used to invoke the remote EJB that is protected by the firewall.

Then do the context creation and lookup based on the custom context properties:

InitialContext ic = new InitialContext(env);
Object objref = ic.lookup("java:comp/env/ejb/SomeRemoteEJB");

Those of you who have access to MyOracleSupport should additionally check Doc ID 1276760.1.

If it still will not work for you after following the above advice, then unfortunately I am at my wits' end and can only suggest to buy a license/support contract and raise a SR about it, as AFAIK, this is supposed to work.

Hope this helps & best regards,
Andreas

--
Andreas Loew | Senior Java Architect
ACS Principal Service Delivery Engineer
ORACLE Germany

mauro2011
Offline
Joined: 2011-06-08
Points: 0

hi Andreas Loew.

Hi have read your post.
I you ask for comprension:
1) into the iiop-listener default of glassfsih at port 3700 what ip hi have to set? 0.0.0.0 or ip private of my LAN 192.169.1.20 or the ip public adress of my router ????????

2) into the /etc/host and /etc/hosts what i have to set?

3) if into my panel administration of glassfsih i add a new iiop listener at port 3701 for example for the ORB request from my LAN it is correct ? what ip i have to set into iiop listener?192.168.1.20 ?

in that case the default port 3700 it is for orb request from outside LAN , from the internet , and from 3701 from the other pc from my LAN.
Or it is not legal have 2 listenr iiop on port 3700 and 3701 ????????

4) form your post your suggest to set the properties:
Properties env = new Properties();
env.put("java.naming.factory.initial","com.sun.enterprise.naming.SerialInitContextFactory");
env.put("java.naming.factory.url.pkgs","com.sun.enterprise.naming");
env.put("java.naming.factory.state","com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
env.put("org.omg.CORBA.ORBInitialHost","public IP address of GF behind NATting device"));
env.put("org.omg.CORBA.ORBInitialPort","public port of GF behind NATting device"));
env.put("com.sun.corba.ee.ORBVAAHost","public IP address of GF behind NATting device"));
env.put("com.sun.corba.ee.ORBVAAPort","public port of GF behind NATting device"));
env.put("com.sun.corba.ee.ORBUserConfigurators.com.sun.corba.ee.impl.plugin.hwlb.VirtualAddressAgentImpl","dummy");

------
if i have understand i have to set org.omg.CORBA.ORBInitialHost" and com.sun.corba.ee.ORBVAAHost at the same value for example 95.226.150.34 ??(the public adress of my router ???)

the org.omg.CORBA.ORBInitialHost is not the private adress 192.168.1.20 of the glassfsih into LAN??????

org.omg.CORBA.ORBInitialPort and com.sun.corba.ee.ORBVAAPort at the same value??????

------------------------
from http://docs.oracle.com/cd/E26576_01/doc.312/e24930/java-clients.htm#ghbpc
i read:
---------------------------------------------------------------------
Set the ORBVAAHost and ORBVAAPort options to the host and port of the public address. The ORBUserConfigurators option tells the ORB to create an instance of the VirtualAddressAgentImpl class and invoke the configure method on the resulting object, which must implement the com.sun.corba.ee.spi.orb.ORBConfigurator interface. The ORBUserConfigurators value doesn't matter. Together, these options create an ORB that in turn creates Object references (the underlying implementation of remote EJB references) containing the public address, while the ORB listens on the private address specified for the IIOP port in the GlassFish Server configuration.

-----------------------------------------------------
The ORBUserConfigurators value doesn't matter. what it is your value "dummy"??????

tank you
Mauro

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi Mauro,

mauro2011 wrote:

1) into the iiop-listener default of glassfsih at port 3700 what ip hi have to set? 0.0.0.0 or ip private of my LAN 192.169.1.20 or the ip public adress of my router ????????

Either 0.0.0.0 (will cause GF to listen on all network interfaces of your machine) or the private IP within your LAN (behind the NATing device) to listen on just this interface.

mauro2011 wrote:

2) into the /etc/host and /etc/hosts what i have to set?

The hostname of your machine needs to be resolved to its proper local LAN (behind the NATing device) IP address - whether via DNS or via /etc/hosts.

mauro2011 wrote:

3) if into my panel administration of glassfsih i add a new iiop listener at port 3701 for example for the ORB request from my LAN it is correct ? what ip i have to set into iiop listener?192.168.1.20 ?

As above - either use 0.0.0.0 for all interfaces of your machine or use the local LAN IP of the appropriate inbound interface (behind the NATing device).

mauro2011 wrote:

in that case the default port 3700 it is for orb request from outside LAN , from the internet , and from 3701 from the other pc from my LAN.
Or it is not legal have 2 listenr iiop on port 3700 and 3701 ????????

It is perfectly legal to have two ORB listeners on two ports, but your issue most probably is that you have only one system property, i.e. you can either have it set or not set, therefore if you set the virtual address agent (VAA) properties as system properties, your GF instance will no longer be able to answer to requests from your local LAN (on neither port).

It is therefore mandatory that in case you need to call into your GF from inside the firewall/NATing device as well as from the outside, you must not set the properties as system properties, but only as custom InitialContext properties from those clients which reside outside the firewall/NAT device.

mauro2011 wrote:

4) form your post your suggest to set the properties:
if i have understand i have to set org.omg.CORBA.ORBInitialHost" and com.sun.corba.ee.ORBVAAHost at the same value for example 95.226.150.34 ??(the public adress of my router ???)

Yes, that's right: For clients which reside outside the firewall, both org.omg.CORBA.ORBInitialHost/Port and com.sun.corba.ee.ORBVAAHost/Port have to be the same value, namely the public IP address/port of GF as seen from outside the firewall/NATing device using the custom properties-based InitialContext approach.

Clients inside the firewall of course use the local host/port of the GF instance as seen from the LAN behind the firewall and don't need the specific VAA properties in the InitialContext.

mauro2011 wrote:

The ORBUserConfigurators value doesn't matter. what it is your value "dummy"??????

It is important that you set the property to a non-null value, but it is not important what that specific value is (the test is coded whether the property is null or not). So you can set it to any value besides an empty string right of the "=" char.

mauro2011 wrote:

thank you
Mauro

You're welcome - I hope it will start working for you now with these hints... :-)

Best regards,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

the Doc ID 1276760.1
i don't view it.

But you have a pdf or a document on the same topic?

Do You have a blog ?

If i you send my email you can send me a example of a simple client ejb?
tank you mauro

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi again Mauro,

does this link work:

https://support.oracle.com/epmos/faces/DocContentDisplay?id=1276760.1

No, I don't have a blog, and I must not share a PDF of the above outside MyOracleSupport, so you need to get it from there.

What do you mean by a "client EJB"!? An EJB is a server-side component. Or do you mean that you are trying to call from an EJB into another EJB in a remote container?

So what is your particular client scenario?

There is nothing special at all to the EJB code as such (so I don't think that a code sample makes much sense - use a hello world EJB sample if you like), the only thing is that you need to use an explicit lookup and the specific InitialContext created from the specific Properties as shown above in order to do the lookup if (and only if) you are outside the firewall.

Of course, this was about a standalone client - I am not sure whether you will be able to code the same using annotations, i.e. an "@EJB" reference, from the ACC or from a client GF instance outside a firewall calling into another one behind the firewall... :-(

Your best bet in these cases most probably also is to use the explicit lookup approach as described above - even though this thwarts the dependency injection concept (but I really wouldn't know how to pass the custom Properties into an InitialContext instance which is to be autoconfigured by the ACC) - definitely worth another JIRA entry/enhancement request...

Hope this helps & best regards,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

hi, i have to make a app client like you have says.

But i get a exception:

hi. i have deployed a web application.
i get the following exception:

java.lang.ClassNotFoundException: org.glassfish.api.admin.ProcessEnvironment

java.lang.RuntimeException: Error launching or running the application
at org.glassfish.appclient.client.JWSAppClientContainerMain.main(JWSAppClientContainerMain.java:144)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1809)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1750)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1512)
at com.sun.javaws.Launcher.run(Launcher.java:130)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/glassfish/api/admin/ProcessEnvironment
at org.glassfish.appclient.client.JWSAppClientContainerMain$ClientRunner.run(JWSAppClientContainerMain.java:179)
at org.glassfish.appclient.client.JWSAppClientContainerMain.main(JWSAppClientContainerMain.java:138)
... 9 more
Caused by: java.lang.NoClassDefFoundError: org/glassfish/api/admin

at org.glassfish.appclient.client.acc.ACCModulesManager.initialize(ACCModulesManager.java:105)
at org.glassfish.appclient.client.acc.AppClientContainerBuilder.prepareHabitat(AppClientContainerBuilder.java:205)
at org.glassfish.appclient.client.acc.AppClientContainerBuilder.newContainer(AppClientContainerBuilder.java:164)
at org.glassfish.appclient.client.acc.AppClientContainerBuilder.newContainer(AppClientContainerBuilder.java:153)
at org.glassfish.appclient.client.AppClientFacade.createContainerForJWSLaunch(AppClientFacade.java:503)
at org.glassfish.appclient.client.AppClientFacade.createContainer(AppClientFacade.java:462)
at org.glassfish.appclient.client.AppClientFacade.prepareACC(AppClientFacade.java:269)
at org.glassfish.appclient.client.JWSAppClientContainerMain$ClientRunner.run(JWSAppClientContainerMain.java:168)
... 10 more
Caused by: java.lang.ClassNotFoundException: org.glassfish.api.admin.ProcessEnvironment
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:332)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 18 more

what jar i have to add at APp Client before deploy it at glassfsih and then download with javaweb start?^

mauro2011
Offline
Joined: 2011-06-08
Points: 0

tank you very much for your support .!!!!!!!!!
I will go tried .

I have 3 possible scenario:

1) Write a EnterpriseApplicationClient deployed on glassfsih and form a browser i will download with javawebstart. It use the ACC .

2) i call a EJb from a Tomcat web application. The EJB is deployed into a Remote GLassfih
3) i write a application standlone client taht call a Remote ejb on a remote glassfsih.

........................................................................
i will call on all case the ejb with the InitialCOntext from the properties .
to use an explicit lookup and the specific InitialContext created from the specific Properties as shown above in order to do the lookup if (and only if) you are outside the firewall.

In ultimate what jars i have to put into the lib of webapplication on tomcat for call the ejb?

mauro

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi Mauro,

I can't give you a definitive answer in case you are looking for the minimal set of JARs that you need in the client-side classpath, because this hugely depends on your particular scenario.

You can have a look at what is being packaged into the appclient zipfile by the package-appclient" command:

http://docs.oracle.com/cd/E26576_01/doc.312/e24938/package-appclient.htm...

$GF_HOME/glassfish/lib/package-appclient.xml

and/or have a look at the MANIFEST.MF "Class-Path" entries in

$GF_HOME/glassfish/lib/gf-client.jar

in order to determine the maximum superset of JARs and other files needed.

The respective docs section is here:

http://docs.oracle.com/cd/E26576_01/doc.312/e24930/java-clients.htm#gkusp

and states:

"Copy the as-install/lib/gf-client.jar file to the client machine and include it in the classpath on the client side.
The gf-client.jar file references GlassFish Server JAR files in its MANIFEST.MF file. If there is no GlassFish Server installation on the client machine, you must also copy the as-install/modules directory to the client machine and maintain its directory structure relative to the as-install/lib/gf-client.jar file. Or you can use the package-appclient script (...)"

HTH & best regards,

Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

Hi andrea .
If i have undetstand into a classpath i havr to add the gf-client.jar and the module/*.jars.

But into a netbens progect i put the gf-client.jar into the lib of progect. So the directory module it is at same level of lib dir into glassfish. So i put the directory module into web-inf at the same level of dir lib of my web project for tomcat ?
You can it work?
Another solution it is put into §Catalina_home/conf/catalina.properties the propertie common.loade
=/home/mauro/glassfish3.1.2.2/glassfish/lib/gf-client.jar

So the module dir with all jars it is referencied from manifest file inside the gf-client.jar

So the gf-client.jars and module/*.jar will be disponiblle for all web application deployed into tomcat.
Do you think that it will work?
Mauro

mauro2011
Offline
Joined: 2011-06-08
Points: 0

Go at http://pragmaticjava.blogspot.it/2009/01/tomcat-6-and-class-loading.html...
for the common.loader from the §catalina_home/conf/catalina.properties

best regards
mauro

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi Mauro,

sorry, but I really cannot help you with Tomcat-specific classloading stuff (Tomcat is really out of scope for me, unless I were to run into a customer trying to run a scenario like yours).

I fear that Tomcat won't evaluate the META-INF/MANIFEST.MF of the gf-client.jar if you simply put this file into Tomcat's classpath. Also, as stated by the doc link, the manifest-managed way of determining the classpath does only work if you keep the relative file system structure (simply check the contents of the META-INF/MANIFEST.MF "Class-Path" entry and you will know what I mean: they do contain relative paths from the GF installation. You may want to consider the results of the package-appclient script.

Also, maybe Google can be used to help you here (I did not check whether this indeed works):

http://javahowto.blogspot.co.uk/2011/06/tomcat-to-glassfish-remote-ejb.html

Still, it might be preferable to put all the GF client libraries needed into the WEB-INF/lib of your Tomcat web app WAR file, as opposed to modifying system-wide Tomcat classpaths.

Best regards,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

Dear Anddrea
But i put into web-inf/ lib of my web applic all jars from inside directory module of glassfih and not gf-client.jar ? It is not necessaire ?
Mauro

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi Mauro,

ok - so when you did as you described (putting all the JARs from the GF modules dir into the WEB-INF/lib of your Tomcat WAR file), what issue(s)/exceptions did you see?

Please copy the complete stacktraces and the respective portion of your EJB lookup code the stacktrace points to - maybe we can find out what might be going wrong...

BR,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

I get a class not found exception for com.sun..enterprise.serialinitialcontext
but into the sane pachage into the war u have put a class with a main method . And if run the main class it work.

The class it is into the classpath .

I have read thT can be a problem clasdloader frim tomcat.
But hiw fix it ?
http://netbeans.dzone.com/nb-call-ejb-on-glassfish

Read the link above.

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi Mauro,

you need to track down why it is not working.

If you did everything as stated before, you should have glassfish-naming.jar within WEB-INF/lib, and this JAR contains classes

com.sun.enterprise.naming.SerialInitContextFactory and
com.sun.enterprise.naming.impl.SerialInitContextFactory

This means that you clearly must not get a ClassNotFoundException in case you indeed did everything correctly as stated before.

So I'm terribly sorry, but there must be something wrong in your setup. I definitely cannot help at all if you won't be able to set things up in a proper way... :-(

Best regards,
Andreas

al130959
Offline
Joined: 2005-09-28
Points: 0

Addition:

Another class with a similar name is

com.sun.enterprise.naming.impl.SerialContext

(without "Initial" and without "Factory"), but that's contained in the same glassfish-naming.jar as well...!?

BR,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

the exceotion it is:

java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi Mauro,

may I request you to post the complete error stack trace, because there could be nested exceptions that might explain why you still get ClassNotFound even though providing the JARs needed?

If this full stack trace won't help, then I am at my wits' end...

As stated, the only thing I can then say to you is that you need to look at the Tomcat side why - even though you provide the correct/full set of client JARs (supposed you do) - Tomcat still throws a ClassNotFound error on you. To me, it clearly sounds like a misconfiguration at the Tomcat side...

Sorry & BR,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

escuse me .But i you send the tomcat log.
I have put all jars from module directory of glassfsih into web-inf/lib of my project.

nb:glassfsihnaming it is into the classpath

i get the following:
HTTP Status 500 -

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:619)

root cause

java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:619)

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

---------------------------------------------------
26-ott-2012 0.38.54 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.38.54 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.16 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.16 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.35 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.35 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.41.03 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.41.03 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
-------------------------------------------------------------------------

i have also read that i can put into the meta-inf manifest file the classpath at library out of tomcat for not include it into web-inf/lib when it is big size .

But i you ask : what i have to set into it?
Classpat= ????????'

into the glassfish i have the directory lib and directory module
c:\programfiles\glassfsih3.1.2.2\glassfish\lib\gf-client.jar at same level.

c:\programfiles\glassfsih3.1.2.2\glassfish\module\*.jar

into gf-client from the manifest at classpath it referencies: ../module/nameof.jar(the names of jars referencied)

so if i wold reference a external directory or a directory relative into the mywebapplication , what i have to write?

example:
mywebapp/
meta-inf/manifest
web-inf/
module/( many jars referencied from gf-client.jar into the lib directory)
lib/gf-client.jar /copied from glassfish/lib)

what i have to write to reference the gf-client and module dir either i have into the webapplication or exsternal for example into
c:\mylib\
module\*.jar
lib\gf-client.jar
-------------------------------------

i you send my proget netbeans

into the directory of project you have the glassfish_lib directory . I CAN PUT INTO THE MODULE DIRECTORY OF GLASSFSIH :BUT HOW I CAN REFERENCE IT FORM MANIFEST FILE INTO META-INF directory of my web project?

mauro

i you send my project:

the 3 zip attachmetns contains:

- edwininterfacce (the progect library of the remote interface)

- compressedEJBserver (the ejb deployed on glassfsih 3.1.2.2)

- edwin2.zip (the web project deployed on tomcat6) .

I not have put the jars from module dir into it only for send you the project .
Into my pc i have put all jar into the web-inf/lib from the dir module of glassfsih.
TRy it please ..........
i have to put also the gf.client jar into the web.inf/lib ?
But next i have the problem of reference ../module/*.jar

mauro2011
Offline
Joined: 2011-06-08
Points: 0

The jars from modulule dir of glassfish or from appcclient ?
How work it appclieny package?
WhT it is download stubs from the admin page of glassfish from appl deployed?

Best regards
mauro

mauro2011
Offline
Joined: 2011-06-08
Points: 0

i repost . the earlier it not have a beatiful layout. It is a colomm very small. i not read the content........

escuse me .But i you send the tomcat log.
I have put all jars from module directory of glassfsih into web-inf/lib of my project.

nb:glassfsihnaming it is into the classpath

i get the following:
HTTP Status 500 -

type Exception report

message

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

exception

javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:619)

root cause

java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
java.lang.Thread.run(Thread.java:619)

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

---------------------------------------------------
26-ott-2012 0.38.54 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.38.54 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.16 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.16 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.35 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.40.35 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.41.03 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
26-ott-2012 0.41.03 org.apache.catalina.core.StandardWrapperValve invoke
GRAVE: Allocate exception for servlet jsp
java.lang.NoClassDefFoundError: org/apache/jasper/runtime/TldScanner
at org.apache.jasper.EmbeddedServletOptions.(EmbeddedServletOptions.java:697)
at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:158)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1206)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:827)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Thread.java:619)
-------------------------------------------------------------------------

i have also read that i can put into the meta-inf manifest file the classpath at library out of tomcat for not include it into web-inf/lib when it is big size .

But i you ask : what i have to set into it?
Classpat= ????????'

into the glassfish i have the directory lib and directory module
c:\programfiles\glassfsih3.1.2.2\glassfish\lib\gf-client.jar at same level.

c:\programfiles\glassfsih3.1.2.2\glassfish\module\*.jar

into gf-client from the manifest at classpath it referencies: ../module/nameof.jar(the names of jars referencied)

so if i wold reference a external directory or a directory relative into the mywebapplication , what i have to write?

example:
mywebapp/
meta-inf/manifest
web-inf/
module/( many jars referencied from gf-client.jar into the lib directory)
lib/gf-client.jar /copied from glassfish/lib)

what i have to write to reference the gf-client and module dir either i have into the webapplication or exsternal for example into
c:\mylib\
module\*.jar
lib\gf-client.jar
-------------------------------------

i you send my proget netbeans

into the directory of project you have the glassfish_lib directory . I CAN PUT INTO THE MODULE DIRECTORY OF GLASSFSIH :BUT HOW I CAN REFERENCE IT FORM MANIFEST FILE INTO META-INF directory of my web project?

mauro

i you send my project:

the 3 zip attachmetns contains:

- edwininterfacce (the progect library of the remote interface)

- compressedEJBserver (the ejb deployed on glassfsih 3.1.2.2)

- edwin2.zip (the web project deployed on tomcat6) .

I not have put the jars from module dir into it only for send you the project .
Into my pc i have put all jar into the web-inf/lib from the dir module of glassfsih.
TRy it please ..........
i have to put also the gf.client jar into the web.inf/lib ?
But next i have the problem of reference ../module/*.jar

al130959
Offline
Joined: 2005-09-28
Points: 0

Hi Mauro,

sorry, but I will stop looking into this now: The root error cause of your stacktrace is completely different from what you stated before to be your issue!!!

From your stacktrace, you seem to have more than one version of class org.apache.jasper.runtime.TldScanner in your classpath (most probably one as included with Tomcat, and another one from just blindly copying all Glassfish libraries into your webapp WEB-INF/lib), which is completely unrelated to trying to access an EJB deployed into Glassfish through a NAT device.

My ony final recommendation is to try your client first from a standalone pure-Java application outside of Tomcat, and only after you got that to work fine, move forward to address the issues that are caused by Tomcat and Glassfish client libraries coming with a common set of classes like the TldScanner (which must be visible only from one classloader to get rid of the NoClassDefFoundException).

Sorry, but I'm not going to waste any more time with this: I am not going to teach you the basics of Java EE programming and classloader delegation...

BR,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

escuse me .
I have get finally the real exception .!!!!

i you send .
the stack trace .

..............
javax.naming.NoInitialContextException: Cannot instantiate class: com.sun.enterprise.naming.SerialInitContextFactory [Root exception is java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory] at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657) at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288) at javax.naming.InitialContext.init(InitialContext.java:223) at javax.naming.InitialContext.(InitialContext.java:197) at mauro.test.Test1Remote.getInitialContext(Test1Remote.java:35) at mauro.test.Test1Remote.processRequest(Test1Remote.java:56) at mauro.test.Test1Remote.doGet(Test1Remote.java:90) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 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.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassNotFoundException: com.sun.enterprise.naming.SerialInitContextFactory at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1526) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:247) at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46) at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654) ... 20 more

--------------------------
best regard.Mauro
tank you

al130959
Offline
Joined: 2005-09-28
Points: 0

OK Mauro,

so it turns out from this that you are asking here about a Tomcat issue:

It is the Tomcat classloader:

org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1680)

that responds with the ClassNotFoundException when asked by the JDK class

com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)

to load Glassfish class com.sun.enterprise.naming.SerialInitContextFactory.

The solution to this issue is a proper Tomcat and web app setup, which you still don't seem to have - but sorry, I won't help you with your Tomcat issues here... :-(

Best regards,
Andreas

mauro2011
Offline
Joined: 2011-06-08
Points: 0

finally i get the InitialCOntext , but when i call the ejb i get another eception:

it seem that the name of interface of myejb it is not bound in the COntext.

But the ejb uit is deployed and the fully nome of interface it is ok!

Name com.edw.facade.ConnectionFacadeRemote is not bound in this Context javax.naming.NameNotFoundException

i post the complet code of my servlet and the exception;

if i make cts.toString() i get context=javax.naming.InitialContext@7a9224

but the call at context it is without props.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.enterprise.naming.SerialInitContextFactory");

if i add the code i get the excption fot Class not found for com.sun.enterprise.naming.SerialInitContextFactory

the InitialContext it is from constructor without arguments.

--------------------------------------

protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html;charset=UTF-8");
PrintWriter out = response.getWriter();

ClassLoader prev = Thread.currentThread().getContextClassLoader();

ClassLoader dlapplication= this.getClass().getClassLoader();
Thread.currentThread().setContextClassLoader(dlapplication);

try{

System.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
InitialContext ctx = new InitialContext();
ctx.addToEnvironment("org.omg.CORBA.ORBInitialHost", "localhost");
ctx.addToEnvironment("org.omg.CORBA.ORBInitialPort", "3700");

ConnectionFacadeRemote connectionFacadeRemote = (ConnectionFacadeRemote) ctx.lookup("com.edw.facade.ConnectionFacadeRemote");
String result = connectionFacadeRemote.sayHello("edwin ") + "\n" + "my age is " + connectionFacadeRemote.sayAge(12) + " years";
String descrive=ctx.toString();

}

} catch (NamingException nex) {
out.println("eccezione: " + nex.getMessage());
nex.printStackTrace(out);

} catch (Exception nex) {
out.println("eccezione: " + nex.getMessage());
nex.printStackTrace(out);

} finally {
Thread.currentThread().setContextClassLoader(prev);
out.close();
}
}

eccezione: Name com.edw.facade.ConnectionFacadeRemote is not bound in this Context javax.naming.NameNotFoundException: Name com.edw.facade.ConnectionFacadeRemote is not bound in this Context at org.apache.naming.NamingContext.lookup(NamingContext.java:770) at org.apache.naming.NamingContext.lookup(NamingContext.java:153) at org.apache.naming.SelectorContext.lookup(SelectorContext.java:152) at javax.naming.InitialContext.lookup(InitialContext.java:392) at test.Uno.processRequest(Uno.java:76) at test.Uno.doGet(Uno.java:152) at javax.servlet.http.HttpServlet.service(HttpServlet.java:617) 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.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393) 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:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:602) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)

context=javax.naming.InitialContext@7a9224

mauro2011
Offline
Joined: 2011-06-08
Points: 0

i have view a video on youtube :
Part V - Calling a stateful bean using jndi lookup with GlassFish .

Into the video a read:

System.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
InitialContext ctx= new InitialContext();

ctx.addToEnvironment("org.omg.CORBA.ORBInitialPort", "3700");

whi the propertie "org.omg.CORBA.ORBInitialHost", "localhost" it is set up 2 times?
System.setProperty("org.omg.CORBA.ORBInitialHost", "localhost");
ctx.addToEnvironment("org.omg.CORBA.ORBInitialHost", "localhost");

.....................................................................

mauro2011
Offline
Joined: 2011-06-08
Points: 0

escuse me .
but i can post the problem on the section named "General PRogrammin HElp " of the formu java.net ??

Tank you for your patience and your advice.

i have posted the probem at :
http://www.java.net/forum/topic/general-programming-help/tomcat-problem-...

Mauro