Mantis - Resin
|
|||||
Viewing Issue Advanced Details | |||||
|
|||||
ID: | Category: | Severity: | Reproducibility: | Date Submitted: | Last Update: |
4491 | minor | always | 04-09-11 11:16 | 04-27-11 17:56 | |
|
|||||
Reporter: | rickHigh | Platform: | |||
Assigned To: | ferg | OS: | |||
Priority: | normal | OS Version: | |||
Status: | closed | Product Version: | |||
Product Build: | Resolution: | fixed | |||
Projection: | none | ||||
ETA: | none | Fixed in Version: | 4.0.18 | ||
|
|||||
Summary: | 0004491: Roo app not running in Resin (JPA w/o jta-data-source) | ||||
Description: |
Roo is the way to generate "best practice" spring 2.5/3.0 applications. Roo apps are tested in JBoss and Tomcat and they run out of the bat in those environments. Roo apps do not seem to run in a Resin environment without changes. It appears that Resin finds a loads the persistence.xml file (which it does at at com.caucho.env.jpa.PersistenceUnitManager.createDelegate(PersistenceUnitManager.java:396)). Then Hibernate complains that there is no JDBC connection. [java] java.lang.UnsupportedOperationException: The user must supply a JDBC connection [java] at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:54) [java] at org.hibernate.tool.hbm2ddl.SuppliedConnectionProviderConnectionHelper.prepare(SuppliedConnectionProviderConnectionHelper.java:51) [java] at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:263) [java] at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:219) [java] at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:372) [java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1842) [java] at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:902) [java] at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:74) [java] at com.caucho.env.jpa.PersistenceUnitManager.createDelegate(PersistenceUnitManager.java:396) [java] at com.caucho.env.jpa.PersistenceUnitManager.start(PersistenceUnitManager.java:363) [java] at com.caucho.env.jpa.PersistenceManager.startPersistenceUnits(PersistenceManager.java:354) [java] at com.caucho.env.jpa.PersistenceManager.environmentConfigureEnhancer(PersistenceManager.java:609) [java] at com.caucho.loader.EnvironmentClassLoader.config(EnvironmentClassLoader.java:838) [java] at com.caucho.loader.EnvironmentClassLoader.bind(EnvironmentClassLoader.java:856) [java] at com.caucho.loader.EnvironmentClassLoader.start(EnvironmentClassLoader.java:883) Roo apps come preconfigured with this for JDBC (in applicationContext.xml): <bean class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close" id="dataSource"> <property name="driverClassName" value="${database.driverClassName}"/> <property name="url" value="${database.url}"/> <property name="username" value="${database.username}"/> <property name="password" value="${database.password}"/> </bean> I know there are workarounds. We should document the workaround on the Resin wiki and on the Roo forum. This way folks that want to use Roo with Spring 3 can. Also in the future Resin may want to check to see if jta-data-source is set in the persistence.xml. <jta-data-source>jdbc/basic</jta-data-source> If jta-data-source is not set, then it might be a good idea if Resin does not process the persistence.xml and assume Spring or something else is going to deal with it directly. I think many (if not most) Spring applications use BasicDataSource and not JNDI. Resin might not work with a lot of JPA applications for this reason. |
||||
Steps To Reproduce: | |||||
Additional Information: | |||||
Relationships | |||||
Attached Files: |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|