On Jan 29, 2008, at 1:56 PM, Jeff Schmitz wrote:
Hello,
Once again I find myself of classpath/jar hades.
:-P
I have the following code that runs on my development machine fine:
FileInputStream is = new FileInputStream(this.poolDir + poolName
+ "/" + Constants.FILENAME_PROPERTIES);
SAXBuilder builder = new SAXBuilder();
Document propertiesDoc = builder.build(is);
XPath xPath = XPath.newInstance(Constants.XPATH_TAGLINE);
However, when I deploy, I get the below exception on the Xpath
xPath = ... line.
Are you certain this is not on this line? Perhaps the code on your
machine and on the server is different (different line numbers)?
SAXBuilder builder = new SAXBuilder();
java.lang.NoClassDefFoundError: org/jdom/input/SAXBuilder
at com.netBrackets.core.FileIO.getTagline(FileIO.java:49)
at com.netBrackets.core.SponserConfig.<init>
(SponserConfig.java:29)
at UserInfoWindow.<init>(UserInfoWindow.java:127)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0
(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance
(Constructor.java:494)
at com.webobjects.foundation._NSUtilities.instantiateObject
(_NSUtilities.java:575)
at
com.webobjects.appserver._private.WOComponentDefinition._componentInst
anceInContext(WOComponentDefinition.java:463)
at
com.webobjects.appserver._private.WOComponentDefinition.componentInsta
nceInContext(WOComponentDefinition.java:573)
at com.webobjects.appserver.WOApplication.pageWithName
(WOApplication.java:1954)
at com.webobjects.appserver.WOComponent.pageWithName
(WOComponent.java:1200)
at PoolLogin.login(PoolLogin.java:125)
I've setup my build I think to include all the needed jar files (I
put them in a jars subdirectory of my project - all from here:
http://www.jdom.org/) according to this:
<target name="build.woapp">
....
<woapplication ...>
...
<lib dir="Libraries">
<include name="jars/*.jar"/>
<exclude name="**/*.woa/**"/>
</lib>
</woapplication>
</target>
And since there's no error on the below two lines I'm thinking the
jars are getting included in my deployed build (btw, is there any
way I check for sure that the jars are included by looking at the
deployment bundle?)
Look in AppName.woa/Contents/Resources/Java and also (very, very
carefully) at the classpath at AppName.woa/Contents/MacOS/
MacOSClassPath.txt
SAXBuilder builder = new SAXBuilder();
Document propertiesDoc = builder.build(is);
So, any ideas why it can't seems to find the SAXBuilder class on my
deployment machine when it does find it on the development
machine? Seems I can never deploy any new jars without running
into trouble like this, wish I could figure it out once and for all.
If the above does not show the problem, the next place to look is /
Library/Java/Extensions and /Library/WebObjects/Extensions for
conflicting versions.
Chuck
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-deploy mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-deploy/archive%40mail-archive.com
This email sent to [EMAIL PROTECTED]