On 3 Nov 2012, at 15:32, Leon Wu wrote:

> Thank you, Scott. It was missmatch issue.
> But, I got another problem. I added javaagent but still got this error.

I don't really know anything about Javaagent; the bean enhancement is done 
automatically by OpenJPA during the Ant build and compile process.

> <openjpa-2.0.0-r422266:935683 nonfatal user error>
> org.apache.openjpa.util.UserException: This configuration disallows runtime
> optimization, but the following listed types were not enhanced at build
> time or at class load time with a javaagent: "
> org.apache.wookie.beans.jpa.impl.ParamImpl
> org.apache.wookie.beans.jpa.impl.FeatureImpl
> org.apache.wookie.beans.jpa.impl.WidgetIconImpl
> org.apache.wookie.beans.jpa.impl.PreferenceDefaultImpl
> org.apache.wookie.beans.jpa.impl.OAuthTokenImpl
> org.apache.wookie.beans.jpa.impl.LocalizedBeanImpl
> org.apache.wookie.beans.jpa.impl.WidgetInstanceImpl
> org.apache.wookie.beans.jpa.impl.WidgetImpl
> org.apache.wookie.beans.jpa.impl.ParticipantImpl
> org.apache.wookie.beans.jpa.impl.DescriptionImpl
> org.apache.wookie.beans.jpa.impl.PreferenceImpl
> org.apache.wookie.beans.jpa.impl.SharedDataImpl
> org.apache.wookie.beans.jpa.impl.AuthorImpl
> org.apache.wookie.beans.jpa.impl.LicenseImpl
> org.apache.wookie.beans.jpa.impl.NameImpl
> org.apache.wookie.beans.jpa.impl.StartFileImpl".
> 
> 
> 
> 
> 
> On Fri, Nov 2, 2012 at 5:33 AM, Scott Wilson <[email protected]
>> wrote:
> 
>> On 2 Nov 2012, at 00:45, Leon Wu wrote:
>> 
>>> Hi Scott,
>>> 
>>> You are exactly right. By step by step debugging, I found that my
>>> context.xml is configured with derby db stuff and it found the datasource
>>> after I changed it to mysql parameters.
>>> However, it hits another problem. The Tomcat is hang on over there for a
>>> while and throws almost the same exceptions.
>>> By tracing down to the problem, it happens in JPAPersistenceManager (line
>>> 293) when it tries to create the entity manager.
>>>       entityManager = entityManagerFactory.createEntityManager();
>>> 
>>> and the actual exception is thrown by DataSourceFactory of openjpa
>> package
>>> (line 239)
>>>       if (!factory2)
>>>            conn = ds.getConnection(conf.getConnectionUserName(), conf
>>>                       .getConnectionPassword());
>>>       else
>>> 
>>> conf.getConnectionUserName and getConnectionPassword return null. I may
>> not
>>> know if it is correct or not.
>> 
>> The main thing to check is that your database name, database user name and
>> database password set in your conf/wookie.xml match your actual MySQL set
>> up.
>> 
>>> But after a step further, it hangs on there
>>> and runtime exception stack is below. It might be the issue with openjpa
>>> config but I don't know how to do that.
>>> 
>> 
>> Actually this looks more like a driver problem. Do you have more than one
>> MySQL connector jar on your classpath?
>> 
>> 

Reply via email to