The following has worked for me to make jars of frameworks. (It doesn't work if there are other jar's in the Resources/Java directory)

cp -R /Library/Frameworks/WOComponentElements.framework /Library/ WebObjects/lib/ mv /Library/WebObjects/lib/WOComponentElements.framework/Resources/ Java/WOComponentElements.jar /Library/WebObjects/lib
cd /Library/WebObjects/lib/WOComponentElements.framework
jar uvf ../WOComponentElements.jar *
cd ..
rm -R WOComponentElements.framework

Alternatively you can try the Apple script which does work with other jars in Resources/Java directory except in cases like ERJavaMail.framework which have important files in META_INF that get clobbered.

/Developer/Makefiles/java_makefiles/CoaxBundleIntoJar.sh /Library/ Frameworks/WOComponentElements.framework /Library/WebObjects/lib


Tim Cummings


On 25/07/2007, at 9:29 AM, Chuck Hill wrote:


On Jul 24, 2007, at 4:14 PM, Randy Wigginton wrote:


For my project I wanted to use the WXCheckbox element; so, I loaded the project into XCode, built the deployment version (which made /Library/Frameworks/WOComponentElements), added that framework to my project. Immediately, I noticed the build never worked; it always gave an error that the jar was not in /Library/ WebObjects/lib.

No. The jars in that location are not the same as the jar in / Library/Frameworks/WOComponentElements/Resourcs/Java/ WOComponentElements.jar. The jars in the lib/ directory are entire frameworks packaged as jars.

No, I don't know how to make Xcode generate one of these jars, hopefully someone else will.


So, I copied the jar to that location, wondering why I needed to do that extra step. I continue on, everything seems to be working fine.

That is because it is using what is in /Library/Frameworks/


So I build a WAR file from my project (which has been successful, thanks to all those that helped). When I deploy the WAR, and attempt to go to the page with the checkbox list, I get this error:
- WOBundle.lookForClassInAllBundles(WXCheckBoxList) failed!
- <com.webobjects.appserver._private.WOComponentRequestHandler>: Exception occurred while handling request: com.webobjects.foundation.NSForwardException [java.lang.ClassNotFoundException] Cannot find class or component named WXCheckBoxList in runtime or in a loadable bundle: <com.webobjects.appserver._private.WOComponentDefinition: Error parsing template for Component : 'jar:file:///quigo/adsonar-server/ webapps/MediaKommandantWO/WEB-INF/lib/MediaKommandantWO.jar!/ Resources/ManageSectionsLibraries.wo': java.lang.ClassNotFoundException: Cannot find class or component named WXCheckBoxList in runtime or in a loadable bundle

That is because the jar you put in lib/ is an ordinary jar, not a jar'ed bundle.

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-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/timcu% 40tpg.com.au

This email sent to [EMAIL PROTECTED]



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to