|
From: <php...@li...> - 2008-12-05 17:12:24
|
I am getting the NoClassDefFoundError in my server logs when I try to
deploy the JavaBridge.war in my WebLogic server. I looked in the mailing
list for this error and I saw 1 guy getting this in tomcat. He
re-deployed his jre and tomcat for it to work. I don't want to
re-install my weblogic. Is there any other way to get around this? I
dropped the same JavaBridge.war in tomcat webapps and it picked it up
and deployed fine. Also, I went through the README section 'Java
Platform Issues' and I don't think it helps me. Are there more steps to
follow to deploy JavaBridge in WebLogic?
Any help is greatly appreciated.
<Dec 5, 2008 11:46:49 AM EST> <Warning> <Deployer> <BEA-149004>
<Failures were detected while initiating Deploy task for application
JavaBridge.>
<Dec 5, 2008 11:46:49 AM EST> <Error> <Deployer> <BEA-149201> <Failed to
complete the deployment task with ID 0 for the application
JavaBridge.
java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:539)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at
weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericCla
ssLoader.java:480)
at
weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoa
der.java:182)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAware
ClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoa
der.java:224)
at
weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAware
ClassLoader.java:41)
at
weblogic.servlet.internal.WebAppServletContext.loadClass(WebAppServletCo
ntext.java:5868)
at
weblogic.servlet.internal.WebAppServletContext.registerEventListener(Web
AppServletContext.java:2882)
at
weblogic.servlet.internal.WebAppServletContext.activateFromDescriptors(W
ebAppServletContext.java:2426)
at
weblogic.servlet.internal.WebAppServletContext.activate(WebAppServletCon
text.java:5904)
at
weblogic.servlet.internal.WebAppServletContext.setActive(WebAppServletCo
ntext.java:5882)
at
weblogic.servlet.internal.WebAppModule.activate(WebAppModule.java:834)
at
weblogic.j2ee.J2EEApplicationContainer.activateModule(J2EEApplicationCon
tainer.java:3315)
at
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer
.java:2194)
at
weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer
.java:2167)
at
weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.act
ivateContainer(SlaveDeployer.java:2503)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.doCommit(Sla
veDeployer.java:2421)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.commit(SlaveDeployer
.java:2138)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.checkAutoCommit(Slav
eDeployer.java:2237)
at
weblogic.management.deploy.slave.SlaveDeployer$Task.prepare(SlaveDeploye
r.java:2132)
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(Slav
eDeployer.java:2384)
at
weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveD
eployer.java:866)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeploye
r.java:594)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeploy
er.java:508)
at
weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandle
r.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
--------------- nested within: ------------------
weblogic.management.ManagementException: - with nested exception:
[java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener]
at
weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(Slav
eDeployer.java:2396)
at
weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveD
eployer.java:866)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeploye
r.java:594)
at
weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeploy
er.java:508)
at
weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandle
r.java:25)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>
|
|
From: <php...@li...> - 2008-12-05 18:36:26
|
Hi,
please see our FAQ entry "Why do I get a NoClassDefFoundError?", it isn't very helpful, but it explains what went wrong.
In this particular case is was a packaging error in php-script.jar, which contained an open reference to the servlet classes. There is not problem with this per se, but the INSTALL.J2SE document stated that one should copy php-script.jar to the java.ext.dirs, which leads to trouble because the open reference cannot be resolved; the servlet classes are loaded from a different loader by your J2EE server.
Please either remove the jar file from java.ext.dirs or copy all of your classes to java.ext.dirs.
Since version 5.3 the documentation has been revised and the JSR223 servlet classes have been moved to the php-servlet.jar.
However, the fundamental problem that Java doesn't have a decent module system still exists.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-12-05 19:01:06
|
Thanks Jost.
I understand what you are saying. But, I haven't done any of that. i.e I
haven't created java.ext.dirs and copied the jars (I am assuming I need
to create that dir 'cos I don't see that existing already).
The one and only step I did is trying to deploy the JavaBridge.war using
weblogic console.
If that is not sufficient and I need to create the java.ext.dirs where
should I create that? I have my WebLogic on Windows XP btw.
Also, I am using the latest bridge, downloaded yesterday.
Thanks much for your help.
-----Original Message-----
From: php...@li...
[mailto:php...@li...]
Sent: Friday, December 05, 2008 1:36 PM
To: php...@li...
Subject: Re: [Php-java-bridge-users] NoClassDefFoundError in WebLogic
Hi,
please see our FAQ entry "Why do I get a NoClassDefFoundError?", it
isn't very helpful, but it explains what went wrong.
In this particular case is was a packaging error in php-script.jar,
which contained an open reference to the servlet classes. There is not
problem with this per se, but the INSTALL.J2SE document stated that one
should copy php-script.jar to the java.ext.dirs, which leads to trouble
because the open reference cannot be resolved; the servlet classes are
loaded from a different loader by your J2EE server.
Please either remove the jar file from java.ext.dirs or copy all of your
classes to java.ext.dirs.
Since version 5.3 the documentation has been revised and the JSR223
servlet classes have been moved to the php-servlet.jar.
However, the fundamental problem that Java doesn't have a decent module
system still exists.
Regards,
Jost Boekemeier
------------------------------------------------------------------------
------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
Nevada.
The future of the web can't happen without you. Join us at MIX09 to
help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.
com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2008-12-05 19:07:26
|
Hi,
>javax/servlet/ServletRequestListener
could it be that your servlet container is old? If so, simply remove the listener declaration from the web.xml contained in JavaBridge.war. It is not essential.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-12-05 20:44:32
|
After I commented out the following:
<!-- Terminate invocable scripts when the JSP/framework request finishes
<listener>
<listener-class>php.java.servlet.RequestListener</listener-class>
</listener -->
JavaBridge got deployed successfully.
But, when I accessed it at http://localhost:7001/JavaBridge/ I am
getting NullPointerException.
PS: I am using weblogic 8.1 so I think my servlet container is 2.3
----------------------------
<Dec 5, 2008 3:36:43 PM EST> <Error> <HTTP> <BEA-101017>
<[ServletContext(id=27346679,name=JavaBridge,context-path=/JavaBridge)]
Roo
t cause of ServletException.
java.lang.NullPointerException
at java.net.URLEncoder.encode(URLEncoder.java:185)
at
php.java.bridge.http.ContextFactory.addNext(ContextFactory.java:115)
at
php.java.bridge.http.ContextFactory.<init>(ContextFactory.java:137)
at
php.java.bridge.http.SimpleContextFactory.<init>(SimpleContextFactory.ja
va:60)
at
php.java.servlet.SimpleServletContextFactory.<init>(SimpleServletContext
Factory.java:51)
at
php.java.servlet.ServletContextFactory.<init>(ServletContextFactory.java
:42)
at
php.java.servlet.ServletContextFactory.addNew(ServletContextFactory.java
:57)
at
php.java.servlet.PhpCGIServlet$CGIEnvironment.setCGIEnvironment(PhpCGISe
rvlet.java:178)
at
php.java.servlet.CGIServlet$CGIEnvironment.init(CGIServlet.java:562)
at
php.java.servlet.PhpCGIServlet.createCGIEnvironment(PhpCGIServlet.java:2
11)
at php.java.servlet.CGIServlet.handle(CGIServlet.java:395)
at php.java.servlet.PhpCGIServlet.handle(PhpCGIServlet.java:350)
at php.java.servlet.CGIServlet.doGet(CGIServlet.java:470)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Se
rvletStubImpl.java:1006)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:419)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.
java:315)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.r
un(WebAppServletContext.java:6718)
at
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSu
bject.java:321)
at
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121
)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServl
etContext.java:3764)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.
java:2644)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
>
-----Original Message-----
From: php...@li...
[mailto:php...@li...]
Sent: Friday, December 05, 2008 2:07 PM
To: php...@li...
Subject: Re: [Php-java-bridge-users] NoClassDefFoundError in WebLogic
Hi,
>javax/servlet/ServletRequestListener
could it be that your servlet container is old? If so, simply remove
the listener declaration from the web.xml contained in JavaBridge.war.
It is not essential.
Regards,
Jost Boekemeier
------------------------------------------------------------------------
------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
Nevada.
The future of the web can't happen without you. Join us at MIX09 to
help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.
com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2008-12-07 12:12:44
|
Hi,
> PS: I am using weblogic 8.1 so I think my servlet container
> is 2.3
Your AS is at least two generations behind. PHP/Java Bridge version 5 needs J2EE 1.4 and above. Please use PHP/Java Bridge version 4.x or 3.x instead. Please see Gary Horen's article "Using PHP-Java Bridges with WebLogic Server" for details.
> I am
> getting NullPointerException.
Since WebLogic 8.1 all deployed .war applications cannot access their file resources anymore; as getRealPath(...) always returns null. Please explode your application .war file and deploy that.
I have tested PHP/Java Bridge 5.3.4 on WebLogic 8.1 on Windows and it runs fine. Except that a) JSR 223 is not available, so all JSR 223 examples will fail, b) java.io.Closeable is not available, used by other examples, c) the RequestListener is not available in servlet spec 2.3 which causes a failure during deployment and d) application.getRealPath() always returns null when standard .war files are being used, which causes a failure in some of the examples.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-12-08 16:07:12
|
Jost, you have been awesome. Thank you very much. I exploded the
JavaBridge.war in my weblogic applications folder and it deployed
flawlessly and I am able to see and execute some of the examples.
Now, here is my actual problem. I have a PHP script which encrypts a
couple of strings and throws out an encrypted token.
The call looks like this in PHP:
include("./library/class.Encryption.php");
$objEncrypt = new Encryption;
$token = $objEncrypt->EncryptArrayPublic($values,$public_key);
I need to use this in Java. In the sense that in my Java Class I need to
call the EncryptArrayPublic function in the Encryption.php script.
Is it possible using this Java/PHP bridge. If yes, please please, could
you give me a little insight into how I should do that? Including where
should I drop the PHP files and the syntax for calling these functions
in Java.
Thank you very much,
-Yugan
-----Original Message-----
From: php...@li...
[mailto:php...@li...]
Sent: Sunday, December 07, 2008 7:13 AM
To: php...@li...
Subject: Re: [Php-java-bridge-users] NoClassDefFoundError in WebLogic
Hi,
> PS: I am using weblogic 8.1 so I think my servlet container
> is 2.3
Your AS is at least two generations behind. PHP/Java Bridge version 5
needs J2EE 1.4 and above. Please use PHP/Java Bridge version 4.x or 3.x
instead. Please see Gary Horen's article "Using PHP-Java Bridges with
WebLogic Server" for details.
> I am
> getting NullPointerException.
Since WebLogic 8.1 all deployed .war applications cannot access their
file resources anymore; as getRealPath(...) always returns null. Please
explode your application .war file and deploy that.
I have tested PHP/Java Bridge 5.3.4 on WebLogic 8.1 on Windows and it
runs fine. Except that a) JSR 223 is not available, so all JSR 223
examples will fail, b) java.io.Closeable is not available, used by other
examples, c) the RequestListener is not available in servlet spec 2.3
which causes a failure during deployment and d)
application.getRealPath() always returns null when standard .war files
are being used, which causes a failure in some of the examples.
Regards,
Jost Boekemeier
------------------------------------------------------------------------
------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas,
Nevada.
The future of the web can't happen without you. Join us at MIX09 to
help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.
com/
_______________________________________________
php-java-bridge-users mailing list
php...@li...
https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users
|
|
From: <php...@li...> - 2008-12-08 18:41:20
|
Hi,
> Is it possible using this Java/PHP bridge.
yes, please see our examples page for details. The only reason why the bridge requires Java 1.5 is the java.io.Closeable interface, which is only syntactic shugar. If we move it from the base to some descendant of PhpScriptEngine, the EngineFactory may decide which ScriptEngine it must return.
I will implement this and publish PHP/Java Bridge version 5.3.4.1 this evening, so that we don't have to support both, old and new versions of the PHP/Java Bridge.
I will port a notice when it is available.
Regards,
Jost Boekemeier
|
|
From: <php...@li...> - 2008-12-09 12:08:10
|
The version is available here: http://downloads.sourceforge.net/php-java-bridge/php-java-bridge_5.3.4.1_j2ee.zip?use_mirror= Please see the php+jsp.jsp and php+jsp2.jsp examples. Regards, Jost Boekemeier |