geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Collins Solutions <Collins-Soluti...@austin.rr.com>
Subject Re: JPA Error
Date Mon, 18 Nov 2013 01:33:57 GMT
I have fixed that issue.  Thank you. Is there a way to turn off 
validation inside geronimo?

On 11/17/2013 12:54 PM, David Jencks wrote:
> I don't know.  Having a hashCode method throw an NPE is not within the expected behavior
of java classes.  Is there some reason you don't want to fix it, whether or not bean validation
is used?
>
> david jencks
>
> On Nov 16, 2013, at 12:08 PM, Collins Solutions <Collins-Solutions@austin.rr.com>
wrote:
>
>> I have not specifically run bean validation outside of geronimo.  Is there a way
to turn off bean validation inside geronimo?
>>
>> On 11/16/2013 01:32 PM, David Jencks wrote:
>>> Are you running bean validation outside geronimo?
>>>
>>>
>>> On Nov 16, 2013, at 10:51 AM, Collins Solutions <Collins-Solutions@austin.rr.com>
wrote:
>>>
>>>> The persist to the database works when it is outside the Geronimo container.
 None of the persist operations work while inside the container.
>>>>
>>>> On 11/16/2013 12:36 AM, David Jencks wrote:
>>>>> Um, isn't this in your code?
>>>>>
>>>>> Caused by: java.lang.NullPointerException
>>>>>     at com.acc.domain.entity.AccClient.hashCode(AccClient.java:213)
>>>>>
>>>>>
>>>>> david jencks
>>>>>
>>>>> On Nov 15, 2013, at 2:38 PM, Collins Solutions <Collins-Solutions@austin.rr.com>
wrote:
>>>>>
>>>>>> I have deployed an application to the geronimo server.  I am getting
an error when the entity is trying to persis to the database.  The error that I am getting
is as follows:
>>>>>>
>>>>>> <openjpa-2.2.2-r422266:1468616 nonfatal general error> org.apache.openjpa.persistence.PersistenceException:
error during validation of <unknown>
>>>>>>     at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2585)
>>>>>>     at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2564)
>>>>>>     at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2468)
>>>>>>     at org.apache.openjpa.kernel.DelegatingBroker.persist(DelegatingBroker.java:1077)
>>>>>>     at org.apache.openjpa.persistence.EntityManagerImpl.persist(EntityManagerImpl.java:716)
>>>>>>     at org.apache.geronimo.persistence.CMPEntityManagerTxScoped.persist(CMPEntityManagerTxScoped.java:87)
>>>>>>     at com.acc.eao.ejb.ClientEAO.saveClient(ClientEAO.java:124)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
>>>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:602)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>>>>>>     at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:174)
>>>>>>     at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:93)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
>>>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:602)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:129)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:45)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:66)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:72)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
>>>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:602)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>>>>>>     at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:130)
>>>>>>     at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:226)
>>>>>>     at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:178)
>>>>>>     at org.apache.openejb.core.ivm.EjbObjectProxyHandler.synchronizedBusinessMethod(EjbObjectProxyHandler.java:255)
>>>>>>     at org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:235)
>>>>>>     at org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:92)
>>>>>>     at org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:284)
>>>>>>     at com.sun.proxy.$Proxy116.saveClient(Unknown Source)
>>>>>>     at com.acc.base.ejb.EmailerACC.saveClient(EmailerACC.java:172)
>>>>>>     at com.acc.base.ejb.EmailerACC.sendContactUs(EmailerACC.java:104)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
>>>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:602)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>>>>>>     at org.apache.openejb.monitoring.StatsInterceptor.record(StatsInterceptor.java:174)
>>>>>>     at org.apache.openejb.monitoring.StatsInterceptor.invoke(StatsInterceptor.java:93)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
>>>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:602)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor.invoke(CdiInterceptor.java:129)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor.access$000(CdiInterceptor.java:45)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor$1.call(CdiInterceptor.java:66)
>>>>>>     at org.apache.openejb.cdi.CdiInterceptor.aroundInvoke(CdiInterceptor.java:72)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>>>>>     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:76)
>>>>>>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>>>>>>     at java.lang.reflect.Method.invoke(Method.java:602)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:181)
>>>>>>     at org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:163)
>>>>>>     at org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:130)
>>>>>>     at org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:226)
>>>>>>     at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:178)
>>>>>>     at org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:142)
>>>>>>     at org.apache.openejb.server.ejbd.EjbRequestHandler.doEjbObject_BUSINESS_METHOD(EjbRequestHandler.java:266)
>>>>>>     at org.apache.openejb.server.ejbd.EjbRequestHandler.processRequest(EjbRequestHandler.java:135)
>>>>>>     at org.apache.openejb.server.ejbd.EjbDaemon.processEjbRequest(EjbDaemon.java:234)
>>>>>>     at org.apache.openejb.server.ejbd.EjbDaemon.service(EjbDaemon.java:164)
>>>>>>     at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:71)
>>>>>>     at org.apache.openejb.server.ejbd.KeepAliveServer$Session.service(KeepAliveServer.java:213)
>>>>>>     at org.apache.openejb.server.ejbd.KeepAliveServer.service(KeepAliveServer.java:233)
>>>>>>     at org.apache.openejb.server.ejbd.EjbServer.service(EjbServer.java:66)
>>>>>>     at org.apache.openejb.server.ServicePool$2.run(ServicePool.java:91)
>>>>>>     at org.apache.openejb.server.ServicePool$3.run(ServicePool.java:120)
>>>>>>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>>>>>>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>>>>>>     at java.lang.Thread.run(Thread.java:780)
>>>>>> Caused by: javax.validation.ValidationException: error during validation
of <unknown>
>>>>>>     at org.apache.bval.jsr303.ClassValidator.unrecoverableValidationError(ClassValidator.java:526)
>>>>>>     at org.apache.bval.jsr303.ClassValidator.validate(ClassValidator.java:169)
>>>>>>     at org.apache.openjpa.lib.util.J2DoPrivHelper$61.run(J2DoPrivHelper.java:1254)
>>>>>>     at org.apache.openjpa.lib.util.J2DoPrivHelper$61.run(J2DoPrivHelper.java:1252)
>>>>>>     at java.security.AccessController.doPrivileged(AccessController.java:229)
>>>>>>     at org.apache.openjpa.persistence.validation.ValidatorImpl.validate(ValidatorImpl.java:278)
>>>>>>     at org.apache.openjpa.validation.ValidatingLifecycleEventManager.fireEvent(ValidatingLifecycleEventManager.java:123)
>>>>>>     at org.apache.openjpa.kernel.BrokerImpl.fireLifecycleEvent(BrokerImpl.java:810)
>>>>>>     at org.apache.openjpa.kernel.BrokerImpl.persistInternal(BrokerImpl.java:2645)
>>>>>>     at org.apache.openjpa.kernel.BrokerImpl.persist(BrokerImpl.java:2581)
>>>>>>     ... 81 more
>>>>>> Caused by: java.lang.NullPointerException
>>>>>>     at com.acc.domain.entity.AccClient.hashCode(AccClient.java:213)
>>>>>>     at org.apache.bval.jsr303.GraphBeanIdentity.hashCode(GraphBeanIdentity.java:123)
>>>>>>     at java.util.HashMap.hash(HashMap.java:351)
>>>>>>     at java.util.HashMap.getEntry(HashMap.java:443)
>>>>>>     at java.util.HashMap.get(HashMap.java:405)
>>>>>>     at org.apache.bval.jsr303.GroupValidationContextImpl.collectValidated(GroupValidationContextImpl.java:145)
>>>>>>     at org.apache.bval.jsr303.ClassValidator.validateBeanNet(ClassValidator.java:342)
>>>>>>     at org.apache.bval.jsr303.ClassValidator.validate(ClassValidator.java:149)
>>>>>>     ... 89 more
>>>>>>
>>>>>>
>>>>>> I am using Geronimo 3.0.1.  My persistance.xml looks like this:
>>>>>>
>>>>>>
>>>>>> <persistence xmlns="http://java.sun.com/xml/ns/persistence" version="2.0">
>>>>>>     <persistence-unit name="acc_db" transaction-type="JTA">
>>>>>> <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>>>>>>        <jta-data-source>acc_db</jta-data-source>
>>>>>>        <class>com.acc.domain.entity.AccAccess</class>
>>>>>>        <class>com.acc.domain.entity.AccCategory</class>
>>>>>>        <class>com.acc.domain.entity.AccCatImage</class>
>>>>>> <class>com.acc.domain.entity.AccContactEmail</class>
>>>>>>        <class>com.acc.domain.entity.AccClient</class>
>>>>>>        <class>com.acc.domain.entity.AccImage</class>
>>>>>>        <class>com.acc.domain.keys.PkCatImage</class>
>>>>>> <exclude-unlisted-classes>true</exclude-unlisted-classes>
>>>>>>        <properties>
>>>>>>             <property name="openjpa.DynamicEnhancementAgent" value="true"/>
>>>>>>             <property name="openjpa.RuntimeUnenhancedClasses"
value="supported"/>
>>>>>>             <property name="openjpa.jdbc.SynchronizeMappings"
value="validate"/>
>>>>>>             <property name="openjpa.Log" value="SQL=WARN"/>
>>>>>>         </properties>
>>>>>>     </persistence-unit>
>>>>>> </persistence>
>>>>>>
>>>>>>
>>>>>> Please point me in the right direction.  Thanks.
>


Mime
View raw message