You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Bernd Bohmann (JIRA)" <ji...@apache.org> on 2007/06/09 14:08:28 UTC

[jira] Created: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
------------------------------------------------------------------------------------------------

                 Key: OPENJPA-256
                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
             Project: OpenJPA
          Issue Type: Bug
         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT
            Reporter: Bernd Bohmann


Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.

I think the java.util.Map in Line 1405 

queryCompilationCachePlugin.instantiate(Map.class, this); 

of OpenJPAConfigurationImpl cause the error.

The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.

Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Reopened: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Bernd Bohmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann reopened OPENJPA-256:
-----------------------------------


In my case 

Configurations.newInstance  wraps the Exception with a ParseException.

I will attach a patch with also catch the ParseException.

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5 
>            Reporter: Bernd Bohmann
>             Fix For: 1.0.0
>
>         Attachments: OPENJPA-256.error.log
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Bernd Bohmann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503158 ] 

Bernd Bohmann commented on OPENJPA-256:
---------------------------------------

OpenJPA is configured by spring and part of the webapp.
The classes are enhanced at build time.

You can see the complete example at:

http://svn.apache.org/repos/asf/myfaces/tobago/trunk/example/addressbook/

the 9.6-incubating version works but any newer version shows this error.

If you want to play with it you can use this version 

http://svn.apache.org/repos/asf/myfaces/tobago/tags/tobago-1.0.11/example/addressbook/

this is using a released version of tobago. You don't need to build the whole project :-).

Please change the property openjpa.version to a newer version in the pom and start the application with

mvn jetty:run-exploded and open a browser with the url http://localhost:8080



> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT
>            Reporter: Bernd Bohmann
>         Attachments: OPENJPA-256.error.log
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey updated OPENJPA-256:
------------------------------------

    Fix Version/s:     (was: 1.0.1)
                   1.0.0

Looks like we're doing another 1.0.0 retry, so this is now in.

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5 
>            Reporter: Bernd Bohmann
>             Fix For: 1.0.0
>
>         Attachments: OPENJPA-256.error.log, OPENJPA256.patch
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Bernd Bohmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann updated OPENJPA-256:
----------------------------------

    Attachment: OPENJPA-256.error.log

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT
>            Reporter: Bernd Bohmann
>         Attachments: OPENJPA-256.error.log
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Patrick Linskey resolved OPENJPA-256.
-------------------------------------

    Resolution: Fixed

Applied the patch, but sadly not until after the 1.0.0 deadline.

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5 
>            Reporter: Bernd Bohmann
>             Fix For: 1.0.1
>
>         Attachments: OPENJPA-256.error.log, OPENJPA256.patch
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marc Prud'hommeaux resolved OPENJPA-256.
----------------------------------------

       Resolution: Fixed
    Fix Version/s: 1.0.0

The QueryCompilationCacheValue class differs from most plugins in that th
e plugin type is the standard java interface Map.class (rather than an openjpa-s
pecific interface), which means that the ClassLoader used to load the implementa
tion will be the system class loader; this presents a problem if OpenJPA is not
in the system classpath, so work around the problem by catching the IllegalArgum
entException (which is what we wrap the ClassNotFoundException in) and try again.

This is fixed as of revision 562011. The only workaround of earlier versions of OpenJPA is to set the "openjpa.QueryCompilationCache" property to "none" (thereby disabling the query compilation cache).

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5 
>            Reporter: Bernd Bohmann
>             Fix For: 1.0.0
>
>         Attachments: OPENJPA-256.error.log
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Bernd Bohmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann updated OPENJPA-256:
----------------------------------

    Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5   (was: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT)

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5 
>            Reporter: Bernd Bohmann
>         Attachments: OPENJPA-256.error.log
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Patrick Linskey (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12503098 ] 

Patrick Linskey commented on OPENJPA-256:
-----------------------------------------

How is OpenJPA configured in your environment? How are you bootstrapping it?

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT
>            Reporter: Bernd Bohmann
>         Attachments: OPENJPA-256.error.log
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Marc Prud'hommeaux (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Marc Prud'hommeaux updated OPENJPA-256:
---------------------------------------

    Fix Version/s:     (was: 1.0.0)
                   1.0.1

Bumping to release 1.0.1 since 1.0.0 is being released.

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5 
>            Reporter: Bernd Bohmann
>             Fix For: 1.0.1
>
>         Attachments: OPENJPA-256.error.log, OPENJPA256.patch
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (OPENJPA-256) java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment

Posted by "Bernd Bohmann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/OPENJPA-256?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bernd Bohmann updated OPENJPA-256:
----------------------------------

    Attachment: OPENJPA256.patch

patch attached

> java.lang.ClassNotFoundException: org.apache.openjpa.util.CacheMap in a jetty spring environment
> ------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-256
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-256
>             Project: OpenJPA
>          Issue Type: Bug
>         Environment: jetty 6.1.3 jdk 1.5 spring 2.0.5 openjpa 1.0.0-SNAPSHOT maven 2.0.5 
>            Reporter: Bernd Bohmann
>             Fix For: 1.0.0
>
>         Attachments: OPENJPA-256.error.log, OPENJPA256.patch
>
>
> Get a ClassNotFoundException: org.apache.openjpa.util.CacheMap.
> I think the java.util.Map in Line 1405 
> queryCompilationCachePlugin.instantiate(Map.class, this); 
> of OpenJPAConfigurationImpl cause the error.
> The classloader in this enviroment is a sun.misc.Launcher$AppClassLoader for java.util.Map not a WebAppClassLoader.
> Changing the Map.class to CacheMap.class solves the problem (the right ClassLoader is used)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.