• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Third Party Jar Project
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Third Party Jar Project


  • Subject: Re: Third Party Jar Project
  • From: Lachlan Deck <email@hidden>
  • Date: Fri, 1 Aug 2008 22:21:59 +1000

Hi John,

On 01/08/2008, at 7:33 PM, John Pollard wrote:

Hi Lachlan,

On 31 Jul 2008, at 22:49, Lachlan Deck wrote:

I then released the application and framework to a test server and annoyingly it can't see packages that are in the jar. The framework release looks fine with the jar inside it. The application MacOSClassPath.txt appears to reference the jar within the framework ok (the same way it successfully references jars in other frameworks).

I note you said to set an option to embed frameworks. In general we release frameworks separately from applications so there is just one version of any framework released and this is shared. Any thoughts on tracking the problem down would be welcome.

Okay, so does your framework look like this? *.framework/Contents/Resources/Java/yourframework.jar *.framework/Contents/Resources/Java/liba.jar *.framework/Contents/Resources/Java/libz.jar

Actually as above but without the Contents directory, so for example: *.framework/Resources/Java/xxxx.jar

Yeah - that's what I meant :-)

My other frameworks look the same (ones that are linked in without a problem)
Yes I have a framework jar (empty) and the other jars I added.


And your app references all these jars in its classpath?

My app is configured in JavaMonitor to run as: /Library/WebObjects/Applications/MPMall.woa/MPMall

When I run that from the command line, I see:

/Library/WebObjects/Applications/MPMall.woa/MPMall -WOSessionTimeOut 3600 -WODebuggingEnabled YES -Xms16m -Xmx1024m -DNSDebugGroups -1 - DNSDebugLevel 2 -Djava.awt.headless=true -Duser.timezone=GMT - WOAllowsConcurrentRequestHandling YES -WODirectConnectEnabled NO
Reading MacOSClassPath.txt ...
Launching MPMall.woa ...
java -XX:NewSize=2m -Xmx64m -Xms32m -DWORootDirectory="/System" - DWOLocalRootDirectory="" -DWOUserDirectory="/Users/admin/wologs" - DWOEnvClassPath="" -DWOApplicationClass=mpMall.Application - DWOPlatform=MacOS -Dcom.webobjects.pid=8377 -Xms16m -Xmx1024m - Djava.awt.headless=true -Duser.timezone=GMT -classpath WOBootstrap.jar com.webobjects._bootstrap.WOBootstrap - WOSessionTimeOut 3600 -WODebuggingEnabled YES -DNSDebugGroups -1 - DNSDebugLevel 2 -Djava.awt.headless=true -Duser.timezone=GMT - WOAllowsConcurrentRequestHandling YES -WODirectConnectEnabled NO
Loading /Library/WebObjects/Applications/MPMall.woa/Contents/MacOS/ MacOSClassPath.txt
Generated classpath:
/Library/WebObjects/Applications/MPMall.woa/Contents/Resources/Java/
/Library/WebObjects/Applications/MPMall.woa/Contents/Resources/Java/ jdom.jar
/Library/WebObjects/Applications/MPMall.woa/Contents/Resources/Java/ mpmall.jar
/System/Library/Frameworks/JavaWebObjects.framework/Resources/Java/ javawebobjects.jar
/System/Library/Frameworks/JavaFoundation.framework/Resources/Java/ javafoundation.jar
/System/Library/Frameworks/JavaXML.framework/Resources/Java/ javaxml.jar
/System/Library/Frameworks/JavaWOExtensions.framework/Resources/ Java/javawoextensions.jar
/System/Library/Frameworks/JavaEOAccess.framework/Resources/Java/ javaeoaccess.jar
/System/Library/Frameworks/JavaEOControl.framework/Resources/Java/ javaeocontrol.jar
/System/Library/Frameworks/JavaJDBCAdaptor.framework/Resources/Java/ javajdbcadaptor.jar
/Library/Frameworks/InraxEOModel.framework/Resources/Java/ inraxeomodel.jar
/Library/Frameworks/MPGoogleCheckout.framework/Resources/Java/ mpgooglecheckout.jar
/Library/Frameworks/MPServerEOs.framework/Resources/Java/ mpservereos.jar
/Library/Frameworks/MPServerSideJars.framework/Resources/Java/ jasperreports-3.0.0.jar
/Library/Frameworks/MPServerSideJars.framework/Resources/Java/ mpserversidejars.jar
/Library/WebObjects/Extensions/activation.jar
/Library/WebObjects/Extensions/avalon-framework-4.1.2.jar
/Library/WebObjects/Extensions/axis-ant.jar
[snip....]


My jar framework is mpserversidejars and the third party jar it contains is jasperreports-3.0.0.jar which is in the list above,

That looks fine.

but the program is unable to import packages from within that jar.

The first error I get is:
Throwable message: Errors were encountered when compiling report expressions class file:
/Library/WebObjects/Applications/MPMall.woa/ TransactionReportGO_1217582539887_16958.java:4: package net.sf.jasperreports.engine does not exist

That sounds like the jasper engine can't find the classpath or something else for that package is missing. Do you have a more complete stacktrace?


import net.sf.jasperreports.engine.*;

But that package is in jasperreports-3.0.0.jar
Adding the jar to /Library/WebObjects/Extensions doesn't help.

Adding the jar to /Library/Java/Extensions fixes the problem.

Interesting. The kind of confirms what I just said above.

These last two points seem to absolve the framework / application class path set up of any wrongdoing! The problem shifts to why /L/J/ E works but any other place on the classpath does not. I have come across similar before but don't know enough about class linking to know why this might be.

Quick google for 'package net.sf.jasperreports.engine does not exist'
Item #1 http://forums.sun.com/thread.jspa?messageID=4249552 suggests you need JDTcompiler.jar on the classpath - which sounds familiar to me (as we use jasper reports for a desktop app). I seem to recall something along those lines.


with regards,
--

Lachlan Deck



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Third Party Jar Project
      • From: John Pollard <email@hidden>
References: 
 >Re: Third Party Jar Project (From: John Pollard <email@hidden>)

  • Prev by Date: ERXFavicon problem
  • Next by Date: Re: Third Party Jar Project
  • Previous by thread: Re: Third Party Jar Project
  • Next by thread: Re: Third Party Jar Project
  • Index(es):
    • Date
    • Thread