DataNucleus - Products
  History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: CORE-3392
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Erik Bengtson
Reporter: Ryan Asleson
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
JPOX Core

Support for zip files containing JPOX plugins : currently causes an Exception

Created: 24/Sep/07 11:05 PM   Updated: 12/Dec/07 11:14 AM
Component/s: None
Affects Version/s: 1.2.0-beta-4
Fix Version/s: 1.2.0-beta-5

File Attachments: 1. Zip Archive plugin-log-2.zip (2 kb)
2. Zip Archive plugin-log.zip (2 kb)

Environment: WebLogic 8.1 on Windows and Solaris, Oracle database

Forum Thread URL: http://www.jpox.org/servlet/forum/viewthread?thread=4628
Datastore: Oracle
Severity: Development


 Description  « Hide
JPOX throws an error when the PMF is created via Spring 2.0 in WebLogic 8.1. The same code runs OK in Tomcat 6.0.13. It appears to be some sort of classloader issue.

In the forum thread Erik says "The protocol zip is not supported... will need a fix. please raise an issue". So here is the issue. I don't understand what the root problem is so I can't comment further.

Forum thread is listed here:

http://www.jpox.org/servlet/forum/viewthread?thread=4628

And includes a zip file that has the error stack trace and the logging output with JPOX.Plugin set to DEBUG.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
Ryan Asleson - 24/Sep/07 11:06 PM
Zip file containing error stack trace and log output with JPOX.Plugin set to DEBUG.

Erik Bengtson - 26/Sep/07 10:27 PM
supports jar, rar, war and zip URL protocols (used to find manifest.mf matching plugin.xml files)

supported format are:

jar:<path>!<file>
zip:<path>!<file>
rar:<rar-path>!<jar-path>!<file>
war:<rar-path>!<jar-path>!<file>
file:<file>

Ryan Asleson - 26/Sep/07 11:03 PM
Glad to see that it is fixed. Thank you!!!

Now a question: Do I need to provide manifest.mf file if I have a plugin.xml file defining a plugin? A few weeks ago Andy (I think) made a change so that a manifest.mf file was not necessary. Is that true? If not, what exactly should the manifest.mf file look like?

Erik Bengtson - 26/Sep/07 11:45 PM
manifest.mf is mandatory. example here:
http://www.jpox.org/docs/1_2/extensions/plugins.html

if you use eclipse IDE for development, everything is created automatically, see:
http://www.jpox.org/docs/1_2/tutorials/user_types_extension.html

Ryan Asleson - 27/Sep/07 01:29 PM
I downloaded the September 27 nightly build and tried again. It errors out, albeit this time with a different error, something about a malformed URL.

I will attach the error stack trace and the output from JPOX.Plugin being set to DEBUG.

For the record, in case it helps any, I have a plugin.xml file located in in the web app's WEB-INF/classes directory. There is also a MANIFEST.MF file located in WEB-INF/classes/META-INF. The plugin class specified in the plugin.xml file is located in WEB-INF/classes, in the correct package.


Ryan Asleson - 27/Sep/07 01:30 PM
Zip file containing the logging output of JPOX.Plugin set to DEBUG and the error stack trace.

Erik Bengtson - 27/Sep/07 08:10 PM
fixed

Ryan Asleson - 28/Sep/07 05:08 PM
OK, I downloaded the September 28th snapshot and it now appears to work. Thank you!!

Andy Jefferson - 28/Sep/07 06:54 PM
Erik,
see the post from Apache JDO mailing list, below. Think its related to your fix ... doesnt allow for spaces in the path ?



After downloading new jpox jars, I started getting the following error,
which I successfully worked around by moving my maven repository to a
location without spaces in the pathname:

enhance.prepare:

    [echo] jpox.enhancer.jarfile is C:\Documents and
Settings\michelle/.maven/repository\jpox\jars\jpox-enhancer-1.2-SNAPSHOT.jar
    [echo] jpox.javafive.jarfile is C:\Documents and
Settings\michelle/.maven/repository\jpox\jars\jpox-java5-1.2-SNAPSHOT.jar
    [echo] jdori.enhancer.classpath is
    [echo] enhance.classpath is
    [java] Exception in thread "main" Error reading manifest file
    [java] org.jpox.exceptions.JPOXException: Error reading manifest file
    [java] at
org.jpox.plugin.NonManagedPluginRegistry.registerBundle(NonManagedPluginRegistry.java:327)
    [java] at
org.jpox.plugin.NonManagedPluginRegistry.registerExtensions(NonManagedPluginRegistry.java:212)
    [java] at
org.jpox.plugin.NonManagedPluginRegistry.registerExtensionPoints(NonManagedPluginRegistry.java:145)
    [java] at
org.jpox.plugin.PluginManager.registerExtensionPoints(PluginManager.java:83)
    [java] at org.jpox.OMFContext.<init>(OMFContext.java:134)
    [java] at
org.jpox.enhancer.JPOXEnhancer.<init>(JPOXEnhancer.java:124)
    [java] at
org.jpox.enhancer.JPOXEnhancer.main(JPOXEnhancer.java:456)
    [java] Caused by: java.io.FileNotFoundException:
C:\Documents%20and%20Settings\michelle\.maven\repository\jpox\jars\jpox-java5-1.2-SNAPSHOT.jar
(The system
cannot find the path specified)
    [java] at java.util.zip.ZipFile.open(Native Method)
    [java] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
    [java] at java.util.jar.JarFile.<init>(JarFile.java:133)
    [java] at java.util.jar.JarFile.<init>(JarFile.java:97)
    [java] at
org.jpox.plugin.NonManagedPluginRegistry.registerBundle(NonManagedPluginRegistry.java:299)
    [java] ... 6 more
    [java] Nested Throwables StackTrace:
    [java] java.io.FileNotFoundException:
C:\Documents%20and%20Settings\michelle\.maven\repository\jpox\jars\jpox-java5-1.2-SNAPSHOT.jar
(The system cannot find
 the path specified)
    [java] at java.util.zip.ZipFile.open(Native Method)
    [java] at java.util.zip.ZipFile.<init>(ZipFile.java:114)
    [java] at java.util.jar.JarFile.<init>(JarFile.java:133)
    [java] at java.util.jar.JarFile.<init>(JarFile.java:97)
    [java] at
org.jpox.plugin.NonManagedPluginRegistry.registerBundle(NonManagedPluginRegistry.java:299)
    [java] at
org.jpox.plugin.NonManagedPluginRegistry.registerExtensions(NonManagedPluginRegistry.java:212)
    [java] at
org.jpox.plugin.NonManagedPluginRegistry.registerExtensionPoints(NonManagedPluginRegistry.java:145)
    [java] at
org.jpox.plugin.PluginManager.registerExtensionPoints(PluginManager.java:83)
    [java] at org.jpox.OMFContext.<init>(OMFContext.java:134)
    [java] at
org.jpox.enhancer.JPOXEnhancer.<init>(JPOXEnhancer.java:124)
    [java] at
org.jpox.enhancer.JPOXEnhancer.main(JPOXEnhancer.java:456)

Erik Bengtson - 30/Sep/07 11:28 AM
fixed issue for spaces within path names