Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 178149 - www-servers/resin-3.1.0 init script for does not work
Summary: www-servers/resin-3.1.0 init script for does not work
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Krzysztof Pawlik (RETIRED)
URL:
Whiteboard:
Keywords:
: 178839 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-05-12 05:32 UTC by Maurice Volaski
Modified: 2007-05-18 13:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Maurice Volaski 2007-05-12 05:32:20 UTC
The init script for resin-3.1.0 does not work. It outputs
Exception in thread "main" java.lang.NoClassDefFoundError: /usr/share/resin/lib/resin/jar

and no actual server is started.

If I manually execute the commands of the script on the command line, it does work, so somehow the environment of the init script is different.

But when I changed cmdline to just  
"${JAVA_HOME}/bin/java -jar /usr/lib/resin/lib/resin.jar ${@}"

it launches fine.
Comment 1 Krzysztof Pawlik (RETIRED) gentoo-dev 2007-05-12 11:06:43 UTC
Do you have

CLASSPATH="$(java-config -p resin)"

in /etc/conf.d/resin ?
Comment 2 Maurice Volaski 2007-05-12 15:36:13 UTC
Yes, this works on the command line, but in the script either it or -resin-home /usr/lib/resin or the combination of the two somehow trips up the script.

CLASSPATH is
/usr/share/resin/lib/saaj.jar:/usr/share/resin/lib/ejb-15.jar:/usr/share/resin/lib/jca-15.jar:/usr/share/resin/lib/jta-101.jar:/usr/share/resin/lib/jstl-11.jar:/usr/share/resin/lib/webutil.jar:/usr/share/resin/lib/resin.jar:/usr/share/resin/lib/j2ee-management-10.jar:/usr/share/resin/lib/jsf-12.jar:/usr/share/resin/lib/jpa-15.jar:/usr/share/resin/lib/resin-util.jar:/usr/share/resin/lib/jaxrpc-15.jar:/usr/share/resin/lib/jcr-101.jar:/usr/share/resin/lib/jsdk-15.jar:/usr/share/resin/lib/script-10.jar:/usr/share/resin/lib/j2ee-deploy-10.jar:/usr/share/resin/lib/jms-11.jar:/usr/share/resin/lib/portlet-10.jar:/usr/share/resin/lib/ecmascript.jar:/usr/share/resin/lib/quercus.jar
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-05-17 08:07:45 UTC
*** Bug 178839 has been marked as a duplicate of this bug. ***
Comment 4 Krzysztof Pawlik (RETIRED) gentoo-dev 2007-05-17 08:17:10 UTC
Could you add 

echo "Running with CLASSPATH=\"${CLASSPATH}\""

just after `export JAVA_HOME' in /etc/init.d/resin and post the result (exactly what apears on the console), also: under what vendor/version of JDK you're running resin?
Comment 5 Dmitry Bashlov 2007-05-17 08:42:21 UTC
(In reply to comment #4)
> Could you add 
> 
> echo "Running with CLASSPATH=\"${CLASSPATH}\""
> 
> just after `export JAVA_HOME' in /etc/init.d/resin and post the result (exactly
> what apears on the console), also: under what vendor/version of JDK you're
> running resin?
> 

java-config -O
/opt/sun-jdk-1.5.0.11


/etc/init.d/resin start
Running with CLASSPATH="/usr/share/resin/lib/saaj.jar:/usr/share/resin/lib/ejb-15.jar:/usr/share/resin/lib/jca-15.jar:/usr/share/resin/lib/jta-101.jar:/usr/share/resin/lib/webutil.jar:/usr/share/resin/lib/jstl-11.jar:/usr/share/resin/lib/resin.jar:/usr/share/resin/lib/j2ee-management-10.jar:/usr/share/resin/lib/jsf-12.jar:/usr/share/resin/lib/jpa-15.jar:/usr/share/resin/lib/resin-util.jar:/usr/share/resin/lib/jaxrpc-15.jar:/usr/share/resin/lib/jcr-101.jar:/usr/share/resin/lib/script-10.jar:/usr/share/resin/lib/j2ee-deploy-10.jar:/usr/share/resin/lib/jms-11.jar:/usr/share/resin/lib/portlet-10.jar:/usr/share/resin/lib/ecmascript.jar:/usr/share/resin/lib/quercus.jar"
 * Starting Resin ...
Exception in thread "main" java.lang.NoClassDefFoundError: javax/el/ELContext 
Comment 6 Krzysztof Pawlik (RETIRED) gentoo-dev 2007-05-17 09:11:37 UTC
Could you change

CLASSPATH="$(java-config -p resin)"

to

CLASSPATH="$(java-config -dp resin)"
Comment 7 Dmitry Bashlov 2007-05-17 09:16:27 UTC
(In reply to comment #6)
> Could you change
> 
> CLASSPATH="$(java-config -p resin)"
> 
> to
> 
> CLASSPATH="$(java-config -dp resin)"
> 

I changed

/etc/init.d/resin start
Running with CLASSPATH="/usr/share/resin/lib/saaj.jar:/usr/share/resin/lib/jaxrpc-15.jar:/usr/share/sun-javamail/lib/mail.jar:/usr/share/iso-relax/lib/isorelax.jar:/usr/share/resin/lib/jsf-12.jar:/usr/share/resin/lib/portlet-10.jar:/usr/share/sun-jaf/lib/activation.jar:/usr/share/resin/lib/ecmascript.jar:/usr/share/resin/lib/jpa-15.jar:/usr/share/resin/lib/script-10.jar:/usr/share/resin/lib/jms-11.jar:/usr/share/resin/lib/jta-101.jar:/usr/share/resin/lib/quercus.jar:/usr/share/resin/lib/ejb-15.jar:/usr/share/resin/lib/jca-15.jar:/usr/share/aopalliance-1/lib/aopalliance.jar:/usr/share/resin/lib/resin.jar:/usr/share/resin/lib/j2ee-management-10.jar:/usr/share/resin/lib/resin-util.jar:/usr/share/resin/lib/jcr-101.jar:/usr/share/resin-servlet-api-2.5/lib/resin-servlet-api.jar:/usr/share/resin/lib/jstl-11.jar:/usr/share/resin/lib/webutil.jar:/usr/share/resin/lib/j2ee-deploy-10.jar"
 * Starting Resin ...
Exception in thread "main" java.lang.NoClassDefFoundError: javax/el/ELContext 
Comment 8 Krzysztof Pawlik (RETIRED) gentoo-dev 2007-05-18 13:12:25 UTC
Fixed, please sync in ~one hour.