From: <php...@li...> - 2006-03-15 09:56:20
|
Hi, just a maybe-silly question concerning setting the java.classpath in the=20 php.ini : Why can not I specify a directory instead of the jars ? I ask because I have 12 jars to set in the cp, so this is bad to=20 maintains their hard-coded names in the php.ini ex : $> ls /home/christophe/workspace/www2/libraries/java/lib/ commons-beanutils-1.5.jar commons-logging-api-1.0.2.jar =20 jcommon-1.0.0.jar xalan.jar commons-collections-2.1.jar CVS =20 jfreechart-1.0.1.jar commons-digester-1.7.jar itext-1.3.1.jar jxl.jar commons-logging-1.0.2.jar jasperreports-1.2.0.jar poi-2.0.jar $> cat /etc/php5/conf.d/java.ini [java] extension=3Djava.so java.java=3D/usr/java/jdk/bin/java java.java_home=3D/usr/java/jdk java.log_level=3D4 java.log_file=3D/var/log/php-java-bridge.log java.classpath=3D/usr/lib/php5/extensions/JavaBridge.jar:/home/christophe= /workspace/www2/libraries/java/lib report.php *Fatal error*: Uncaught [class java.lang.Exception: java.lang.Exception:=20 CreateInstance failed: new Report. Cause:=20 java.lang.NoClassDefFoundError:=20 net/sf/jasperreports/engine/export/JRPdfExporter] thrown in=20 */home/christophe/workspace/www2/report.php* on line *XXX *with the class being defined in*=20 */home/christophe/workspace/www2/libraries/java/lib/jasperreports-1.2.0.j= ar regards, chris* * php...@li... wrote: > Hi, > > =20 >> Just to say I digg into this problem all day and >> still find no solution. >> =20 > > Sorry for that. I assumed that this wasn't an > important issue, you've said that it works if you move > the jars to jre/lib/ext. > > > =20 >> What I do not understand is why a thread does not >> inherit the classpath=20 >> from the creating thread ? >> =20 > > JSP is a good example. The container doesn't want to > make the jsp classloader available to the webapp, so > it sets the thread context classloader to the parent > of the current classloader. > > I don't know if and how your reporting engine handles > this, but in general applications may choose to ignore > our dynamic loader and load classes or create dynamic > proxies via the system classloader. If this happens, > the loaded classes or defined proxies cannot access > classes loaded via the dynamic loader. > > So I think the best workaround is to install your > libraries in $JAVA_HOME/jre/lib/ext or to hard-code > the java.classpath in the php.ini file, for example: > > java.classpath=3D/path/to/JavaBridge.jar:/path/to/lib1.jar:... > > I have created a ticket for this problem, please see > PR1449780 for details > (http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D1449780&g= roup_id=3D117793&atid=3D679233) > > > Thank you very much for this bug report! > > > Regards, > Jost Boekemeier > > > > > > > > > =09 > > =09 > =09 > ___________________________________________________________=20 > Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting lang= uage > that extends applications into web and mobile media. Attend the live we= bcast > and join the prime developer group breaking into this new coding territ= ory! > http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D110944&bid=3D241720&dat= =3D121642 > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > > =20 --=20 =20 _________________________________________________________________________= ______________ Tennaxia, www.tennaxia.com, Pilotez vos obligations environnementales _________________________________________________________________________= ______________ Si=E8ge social : 6, rue L=E9onard de Vinci - 53001 Laval Cedex -=20 T=E9l : 02 43 49 75 50 - Fax : 02 43 49 75 77 Agence Paris : 19, rue r=E9aumur - 75003 Paris -=20 T=E9l : 01 42 77 04 19 - Fax : 08 25 19 19 61 Agence Lyon : Parc du Chater - 63 rue de la garenne - 69340 FRANCHEVILLE -=20 T=E9l : 04 72 39 98 14 - Fax : 04 72 39 93 85 Les informations contenues dans ce message envoy=E9es par TENNAXIA sont c= onfidentielles et sont =E9tablies =E0 l'attention exclusive de leurs destinataires. L'acc=E8= s =E0 ce message par toute autre personne n'est pas autoris=E9. Si vous n'=EAtes pas le de= stinataire de ce message, merci de le d=E9truire et d'en avertir l'exp=E9diteur : toute al= t=E9ration, copie, distribution ou toute action prise ou omise sont interdites et peuvent =EA= tre ill=E9gales. The information in this message sent by TENNAXIA is confidential and may = be legally privileged. It is intended solely for the addressee(s). Access to this me= ssage by anyone else is unauthorized. If you are not the intended recipient, please delet= e it and notify the sender : any disclosure, copying, distribution or any action taken or= omitted to be taken in reliance on it, is prohibited and may be unlawful. |