geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Viet Nguyen" <vhng...@gmail.com>
Subject Re: mysql with geronimo problem
Date Fri, 09 May 2008 17:03:24 GMT
Hi,

I will comment inline.

On Fri, May 9, 2008 at 9:59 AM, mrd3650 <mrd3650@hotmail.com> wrote:
>
> Hi, I have a problem which cannot solve :S can someone help me please?
>
> Basically i have an enterpriseApplication (EAR+EJB+WAR) I have 2 entitybeans
> (Cars and Users)
> these are mapped to a mysql database.
>
> I'm using Eclipse with Geronimo Plugin.
>
> I also setup a database pool from geronimo console set for mysql named
> 'carRentalDbPool'
>
> Below are some files related to the problem i think.
>
> Thnaks a LOTT cos i'm really stuck now :S
>
> Mark.
>
> -----------------------------
> the persistance.xml is:
You probably already know this, but it is persistence.xml, not persistance.xml.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
> http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
>        <persistence-unit name="OnlineCarRentalEJB">
>                provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
>            <class>entityBeans.Cars</class>
>            <class>entityBeans.User</class>
>            <properties>
>              <property name="openjpa.ConnectionURL"
> value="jdbc:mysql://localhost:3306/mysqlcarrentaldb"/>
>              <property name="openjpa.ConnectionDriverName"
> value="com.mysql.jdbc.Driver"/>
>              <property name="openjpa.ConnectionUserName" value="root"/>
>              <property name="openjpa.ConnectionPassword" value="root"/>
>            </properties>
>        </persistence-unit>
> </persistence>
>
> ----------------------
> orm.xml (which i dont know what is it exactly) is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm
> http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" version="1.0">
> </entity-mappings>
>
> --------------------------
> web.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID"
> version="2.5">
>  <display-name>OnlineCarRentalWAR</display-name>
>  <welcome-file-list>
>    <welcome-file>index.jsp</welcome-file>
>  </welcome-file-list>
> ......  <servlet>  and  </servlet-mapping>......
>
>  <resource-ref>
>    <res-ref-name>jdbc/MyDataSource</res-ref-name>
>    <res-type>javax.sql.DataSource</res-type>
>    <res-auth>Container</res-auth>
>    <res-sharing-scope>Shareable</res-sharing-scope>
>  </resource-ref>
> </web-app>
>
> ----------------------------------
> geronimo-web.xml
>
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <ns8:web-app xmlns="http://geronimo.apache.org/xml/ns/j2ee/connector-1.2"
> xmlns:ns2="http://geronimo.apache.org/xml/ns/deployment-1.2"
> xmlns:ns3="http://geronimo.apache.org/xml/ns/naming-1.2"
> xmlns:ns4="http://openejb.apache.org/xml/ns/openejb-jar-2.2"
> xmlns:ns5="http://openejb.apache.org/xml/ns/pkgen-2.1"
> xmlns:ns6="http://geronimo.apache.org/xml/ns/j2ee/application-2.0"
> xmlns:ns7="http://geronimo.apache.org/xml/ns/security-2.0"
> xmlns:ns8="http://geronimo.apache.org/xml/ns/j2ee/web-2.0.1"
> xmlns:ns9="http://java.sun.com/xml/ns/persistence"
> xmlns:ns10="http://geronimo.apache.org/xml/ns/j2ee/application-client-2.0">
>    <ns2:environment>
>        <ns2:moduleId>
>            <ns2:groupId>onlinecarrentalear</ns2:groupId>
>            <ns2:artifactId>onlinecarrental-war</ns2:artifactId>
>            <ns2:version>1.0</ns2:version>
>            <ns2:type>war</ns2:type>
>        </ns2:moduleId>
>        <ns2:dependencies>
>            <ns2:dependency>
>                <ns2:groupId>console.dbpool</ns2:groupId>
>                <ns2:artifactId>carRentalDbPool</ns2:artifactId>
>                <ns2:version></ns2:version>
>                <ns2:type></ns2:type>
>            </ns2:dependency>

You should add a dependency for the mysql driver. I am assuming that
you have the mysql driver installed in your Geronimo instance.

But you can also bundle it with your EAR if you wish. For an example
of bundling everything into an EAR check this out:
http://cwiki.apache.org/GMOxDOC21/very-simple-entity-ejb-example.html

Hope this helps,
Viet

>        </ns2:dependencies>
>    </ns2:environment>
>    <ns8:context-root>/OnlineCarRentalWAR</ns8:context-root>
>    <ns3:resource-ref>
>        <ns3:ref-name>jdbc/MyDataSource</ns3:ref-name>
>        <ns3:resource-link>carRentalDbPool</ns3:resource-link>
>    </ns3:resource-ref>
> </ns8:web-app>
>
> ---------------------------------------------------------
>
> Error
>
> 15:42:29,062 ERROR [[ValidateCustomer]] Servlet.service() for servlet
> ValidateCustomer threw exception
> javax.ejb.EJBException: The bean encountered a non-application exception.;
> nested exception is:
>        <openjpa-1.0.1-r420667:592145 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: There were errors
> initializing your configuration: <openjpa-1.0.1-r420667:592145 fatal store
> error> org.apache.openjpa.util.StoreException: com.mysql.jdbc.Driver in
> classloader org.apache.geronimo.configs/openjpa/2.1/car
>        at
> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:123)
>        at
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:803)
>        at
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:708)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:289)
>        at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1463)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:638)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
>        at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:56)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.createEntityManager(CMPEntityManagerTxScoped.java:74)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.getEntityManager(CMPEntityManagerTxScoped.java:55)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.find(CMPEntityManagerTxScoped.java:123)
>        at sessionBeans.UsersFacade.find(UsersFacade.java:31)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
>        at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
>        at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
>        at
> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>        at
> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>        at $Proxy49.find(Unknown Source)
>        at servlets.ValidateCustomer.processRequest(ValidateCustomer.java:47)
>        at servlets.ValidateCustomer.doPost(ValidateCustomer.java:84)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>        at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>        at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:396)
>        at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in
> classloader org.apache.geronimo.configs/openjpa/2.1/car
>        at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:428)
>        at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Unknown Source)
>        at
> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:85)
>        ... 52 more
>
>        at
> org.apache.openejb.core.ivm.BaseEjbProxyHandler.convertException(BaseEjbProxyHandler.java:366)
>        at
> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:323)
>        at
> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>        at $Proxy49.find(Unknown Source)
>        at servlets.ValidateCustomer.processRequest(ValidateCustomer.java:47)
>        at servlets.ValidateCustomer.doPost(ValidateCustomer.java:84)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>        at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>        at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:396)
>        at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Unknown Source)
> Caused by: <openjpa-1.0.1-r420667:592145 nonfatal general error>
> org.apache.openjpa.persistence.PersistenceException: There were errors
> initializing your configuration: <openjpa-1.0.1-r420667:592145 fatal store
> error> org.apache.openjpa.util.StoreException: com.mysql.jdbc.Driver in
> classloader org.apache.geronimo.configs/openjpa/2.1/car
>        at
> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:123)
>        at
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:803)
>        at
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:708)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:289)
>        at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1463)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:638)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
>        at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:56)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.createEntityManager(CMPEntityManagerTxScoped.java:74)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.getEntityManager(CMPEntityManagerTxScoped.java:55)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.find(CMPEntityManagerTxScoped.java:123)
>        at sessionBeans.UsersFacade.find(UsersFacade.java:31)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
>        at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
>        at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
>        at
> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>        at
> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>        at $Proxy49.find(Unknown Source)
>        at servlets.ValidateCustomer.processRequest(ValidateCustomer.java:47)
>        at servlets.ValidateCustomer.doPost(ValidateCustomer.java:84)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>        at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>        at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:396)
>        at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in
> classloader org.apache.geronimo.configs/openjpa/2.1/car
>        at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:428)
>        at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Unknown Source)
>        at
> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:85)
>        ... 52 more
>
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:205)
>        at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:56)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.createEntityManager(CMPEntityManagerTxScoped.java:74)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.getEntityManager(CMPEntityManagerTxScoped.java:55)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.find(CMPEntityManagerTxScoped.java:123)
>        at sessionBeans.UsersFacade.find(UsersFacade.java:31)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
>        at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
>        at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
>        at
> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>        ... 22 more
> Caused by: java.lang.RuntimeException: There were errors initializing your
> configuration: <openjpa-1.0.1-r420667:592145 fatal store error>
> org.apache.openjpa.util.StoreException: com.mysql.jdbc.Driver in classloader
> org.apache.geronimo.configs/openjpa/2.1/car
>        at
> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:123)
>        at
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.createConnectionFactory(JDBCConfigurationImpl.java:803)
>        at
> org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:708)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:289)
>        at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1463)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:638)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
>        at
> org.apache.openjpa.kernel.DelegatingBrokerFactory.newBroker(DelegatingBrokerFactory.java:142)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:192)
>        at
> org.apache.openjpa.persistence.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:56)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.createEntityManager(CMPEntityManagerTxScoped.java:74)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.getEntityManager(CMPEntityManagerTxScoped.java:55)
>        at
> org.apache.geronimo.persistence.CMPEntityManagerTxScoped.find(CMPEntityManagerTxScoped.java:123)
>        at sessionBeans.UsersFacade.find(UsersFacade.java:31)
>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>        at java.lang.reflect.Method.invoke(Unknown Source)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext$Invocation.invoke(ReflectionInvocationContext.java:146)
>        at
> org.apache.openejb.core.interceptor.ReflectionInvocationContext.proceed(ReflectionInvocationContext.java:129)
>        at
> org.apache.openejb.core.interceptor.InterceptorStack.invoke(InterceptorStack.java:67)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:210)
>        at
> org.apache.openejb.core.stateless.StatelessContainer._invoke(StatelessContainer.java:188)
>        at
> org.apache.openejb.core.stateless.StatelessContainer.invoke(StatelessContainer.java:165)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler.businessMethod(EjbObjectProxyHandler.java:217)
>        at
> org.apache.openejb.core.ivm.EjbObjectProxyHandler._invoke(EjbObjectProxyHandler.java:77)
>        at
> org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)
>        at
> org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
>        at $Proxy49.find(Unknown Source)
>        at servlets.ValidateCustomer.processRequest(ValidateCustomer.java:47)
>        at servlets.ValidateCustomer.doPost(ValidateCustomer.java:84)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:713)
>        at javax.servlet.http.HttpServlet.service(HttpServlet.java:806)
>        at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
>        at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
>        at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
>        at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
>        at
> org.apache.geronimo.tomcat.valve.DefaultSubjectValve.invoke(DefaultSubjectValve.java:56)
>        at
> org.apache.geronimo.tomcat.GeronimoStandardContext$SystemMethodValve.invoke(GeronimoStandardContext.java:396)
>        at
> org.apache.geronimo.tomcat.valve.GeronimoBeforeAfterValve.invoke(GeronimoBeforeAfterValve.java:47)
>        at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
>        at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
>        at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
>        at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
>        at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
>        at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
>        at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
>        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>        at java.lang.Thread.run(Unknown Source)
> Caused by: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver in
> classloader org.apache.geronimo.configs/openjpa/2.1/car
>        at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:428)
>        at
> org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
>        at java.lang.ClassLoader.loadClass(Unknown Source)
>        at java.lang.ClassLoader.loadClassInternal(Unknown Source)
>        at java.lang.Class.forName0(Native Method)
>        at java.lang.Class.forName(Unknown Source)
>        at
> org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:85)
>        ... 52 more
>
>        at
> org.apache.openjpa.lib.conf.ConfigurationImpl.instantiateAll(ConfigurationImpl.java:303)
>        at
> org.apache.openjpa.conf.OpenJPAConfigurationImpl.instantiateAll(OpenJPAConfigurationImpl.java:1463)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.makeReadOnly(AbstractBrokerFactory.java:638)
>        at
> org.apache.openjpa.kernel.AbstractBrokerFactory.newBroker(AbstractBrokerFactory.java:169)
>        ... 42 more
>
> --
> View this message in context: http://www.nabble.com/mysql-with-geronimo-problem-tp17148548s134p17148548.html
> Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.
>
>

Mime
View raw message