OK, the official j2ee WAR does *not* include OpenJPA as I had earlier
written, so the first half of what I had written below can be
discarded. With a few (one or two) enablings and disablings of the WAR
after I successfully deploy it however, I will get a
"RuntimeConfigProperty cannot be cast to RuntimeConfigProperty"
exception though, so I typed up a JIRA on it:
https://issues.apache.org/jira/browse/ROL-1962
Glen
On 05/27/2013 08:23 AM, Glen Mazza wrote:
I'll test again, but it looks, thankfully, like the error was on my
side--I was grabbing the WAR from weblogger-webapp but not
"glassfishized" WAR from weblogger-war-assembly as I should have done.
Glen
On 05/25/2013 06:55 PM, Dave wrote:
The Java EE version worked with Glassfish when I tested it and I
tested it
pretty extensively.
It's suspect that something has changed in our code base that broke
Glassfish support or something has changed in Glassfish.
- Dave
On Sat, May 25, 2013 at 6:05 PM, Glen Mazza <[email protected]>
wrote:
Hi, the J2EE WAR excludes OpenJPA by default
(http://rollerweblogger.org/*
*roller/entry/roller_5_and_**glassfish_3<http://rollerweblogger.org/roller/entry/roller_5_and_glassfish_3>),
but deploying this WAR on (latest) GlassFish returns this error:
[#|2013-05-25T17:44:25.973-**0400|SEVERE|glassfish3.1.2|**
javax.enterprise.system.**container.web.com.sun.**
enterprise.web|_ThreadID=92;_**ThreadName=admin-thread-pool-**
4848(7);|WebModule[/roller]**PWC1270: Exception starting filter
RequestMappingFilter
java.lang.**NoClassDefFoundError: org/apache/openjpa/enhance/**
PersistenceCapable
at java.lang.ClassLoader.**defineClass1(Native Method)
at java.lang.ClassLoader.**defineClass(ClassLoader.java:**791)
at java.security.**SecureClassLoader.defineClass(**
SecureClassLoader.java:142)
at org.glassfish.web.loader.**WebappClassLoader.findClass(**
WebappClassLoader.java:927)
at org.glassfish.web.loader.**WebappClassLoader.loadClass(**
WebappClassLoader.java:1476)
at org.glassfish.web.loader.**WebappClassLoader.loadClass(**
WebappClassLoader.java:1359)
at java.lang.Class.forName0(**Native Method)
at java.lang.Class.forName(Class.**java:186)
at org.apache.roller.weblogger.**ui.rendering.filters.**
RequestMappingFilter.init(**RequestMappingFilter.java:86)
at
org.apache.catalina.core.**ApplicationFilterConfig.**getFilter(**
ApplicationFilterConfig.java:**264)
at org.apache.catalina.core.**ApplicationFilterConfig.<init>**
(ApplicationFilterConfig.java:**120)
Roller won't operate on GlassFish due to this bug. I guess we
hardcoded a
dependency on OpenJPA in the code someplace? I can't find it in the
class
in question, and grepping the source code isn't helping much.
If I use the Tomcat WAR, which includes OpenJPA, this problem goes
away,
but I get off-and-on deployment errors (maybe 25-33% fail) when I
enable &
disable or deploy & undeploy the webapp. It invariably returns this
error
message: Exception while loading the app
java.lang.**IllegalStateException:
ContainerBase.addChild: start:
org.apache.catalina.**LifecycleException:
java.lang.RuntimeException: java.lang.ClassCastException:
org.apache.roller.weblogger.**pojos.RuntimeConfigProperty cannot be
cast
to org.apache.roller.weblogger.**pojos.RuntimeConfigProperty
Googling has shown the immediately above RuntimeConfigProperty error
message to be sometimes an issue with the database config (I'm
running on
MySQL), but the database is updating fine when I'm not getting this
deployment error. I guess we need to code JPA generically in Roller
(i.e.,
remove the OpenJPA references?) I'm a MyBatis fan, so I don't know
much
about JPA. :)
Glen