You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Davide <da...@aliceposta.it> on 2004/01/08 11:32:34 UTC

PHP Generator, compilation problems??

Hi! I finally got php working at 99% (i get some warning messages probably 
due to my fast configuration of php) but with some tricks...because i think 
cocoon doesn't comile php generator...

Following the instructions oh thw cocoon wiki about php generator, I put 
phpsrvlt.jar (bundled with the php binaries for win) in 
"cocoon-2.1.3\lib\local"

then i compile cocoon but php generator doesn't work, with no errors, but 
also no results...only blank page...

Looking at the dos window of tomcat i noticed this exception, after my php 
request:

java.lang.NoSuchMethodError: 
org.apache.cocoon.generation.PhpGenerator$PhpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/String;)V
         at 
org.apache.cocoon.generation.PhpGenerator$PhpServlet.run(PhpGenerator.java:149)
         at java.lang.Thread.run(Thread.java:534)

So i decided to have a look at the source code of PhpGenerator.java but it 
seemd to me perfect (i'm a really bginner in java...)

I decidet do try.... so I put the PhpGenerator.java into my jar, where i 
had my transformer... (obviously adding to che classpath phpsrvlt.jar and 
servlet-api.jar, and changing the name to mcnavigator.generation.PhpGenerator)
i recompiled my package, built jar and put into WEB-INF/lib; after changing 
in the cocoon sitemap the generator src from 
org.apache.cocoon.generation.PhpGenerator to 
mcnavigator.generation.PhpGenerator i tried to load my php and FINALLY it 
ran!!!!!!!!!!

I'm really new to cocoon and java...but it seems cocoon doesn't compile the 
PhpGenerator....

maybe the cocoon-2.1.3\lib\local dir is wrong?? or there is something else 
to do??

Best Regards, Davide






---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: PHP Generator, compilation problems??

Posted by Joerg Heinicke <jo...@gmx.de>.
I don't know your problem, but I got further than you I think:

java.lang.UnsatisfiedLinkError: no phpsrvlt in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
         at java.lang.System.loadLibrary(System.java:834)
         at net.php.reflect.loadLibrary(reflect.java:34)
         at net.php.reflect.<clinit>(reflect.java:29)
         at net.php.servlet.init(servlet.java:157)
         at 
org.apache.cocoon.generation.PhpGenerator.generate(PhpGenerator.java:
193)

I don't know exactly what it means, but I'm already in net.php.* code. 
'phpsrvlt' is referenced from two properties files in phpsrvlt.jar.

I don't think it's a problem of Cocoon, compiling should be ok.

Joerg

On 08.01.2004 11:32, Davide wrote:

> Hi! I finally got php working at 99% (i get some warning messages 
> probably due to my fast configuration of php) but with some 
> tricks...because i think cocoon doesn't comile php generator...
> 
> Following the instructions oh thw cocoon wiki about php generator, I put 
> phpsrvlt.jar (bundled with the php binaries for win) in 
> "cocoon-2.1.3\lib\local"
> 
> then i compile cocoon but php generator doesn't work, with no errors, 
> but also no results...only blank page...
> 
> Looking at the dos window of tomcat i noticed this exception, after my 
> php request:
> 
> java.lang.NoSuchMethodError: 
> org.apache.cocoon.generation.PhpGenerator$PhpServlet.service(Ljavax/servlet/ServletRequest;Ljavax/servlet/ServletResponse;Ljava/lang/String;)V 
> 
>         at 
> org.apache.cocoon.generation.PhpGenerator$PhpServlet.run(PhpGenerator.java:149) 
> 
>         at java.lang.Thread.run(Thread.java:534)
> 
> So i decided to have a look at the source code of PhpGenerator.java but 
> it seemd to me perfect (i'm a really bginner in java...)
> 
> I decidet do try.... so I put the PhpGenerator.java into my jar, where i 
> had my transformer... (obviously adding to che classpath phpsrvlt.jar 
> and servlet-api.jar, and changing the name to 
> mcnavigator.generation.PhpGenerator)
> i recompiled my package, built jar and put into WEB-INF/lib; after 
> changing in the cocoon sitemap the generator src from 
> org.apache.cocoon.generation.PhpGenerator to 
> mcnavigator.generation.PhpGenerator i tried to load my php and FINALLY 
> it ran!!!!!!!!!!
> 
> I'm really new to cocoon and java...but it seems cocoon doesn't compile 
> the PhpGenerator....
> 
> maybe the cocoon-2.1.3\lib\local dir is wrong?? or there is something 
> else to do??
> 
> Best Regards, Davide


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org