Hi to everybody and thanks for the big job you have done!
i know that i am asking a silly question...
i need some help with my first SEAM app.
(i already posted this in the seam forum and gavin told me i should post it
here because Emmanuel would know the answer)
i already have a working app with a sybase ASA9 database.
i'm using seam beta 1 and jboss 4.0.3SP1 without ejb rc4.
works fine. i want to wait till everything is final until i migrate.
now i want to write a test with junit. my problem is that i cant get the
configuration into the entitymanagerfactory. the code looks like this:
| EntityManagerFactory emf;
| ...
| emf = Persistence.createEntityManagerFactory("test");
|
persistence.xml looks like:
| <entity-manager>
| <name>
| test
| </name>
|
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
| <properties>
| <property name="hibernate.dialect"
value="org.hibernate.dialect.SybaseAnywhereDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.connection.driver_class"
value="com.sybase.jdbc2.jdbc.SybDriver"/>
| <property name="hibernate.connection.username" value="..."/>
| <property name="hibernate.connection.password" value="..."/>
| <property name="hibernate.connection.url"
value="jdbc:sybase:Tds:localhost:same as in my app"/>
| <property name="hibernate.max_fetch_depth" value="3"/>
| </properties>
| </entity-manager>
|
i have also tried
| <persistence>
| <persistence-unit name="test" transaction-type="RESOURCE_LOCAL">
|
| <provider>org.hibernate.ejb.HibernatePersistence</provider>
|
| <properties>
| <property name="hibernate.dialect"
value="org.hibernate.dialect.SybaseAnywhereDialect"/>
| <property name="hibernate.hbm2ddl.auto" value="update"/>
| <property name="hibernate.connection.driver_class"
value="com.sybase.jdbc2.jdbc.SybDriver"/>
| <property name="hibernate.connection.username" value="..."/>
| <property name="hibernate.connection.password" value="..."/>
| <property name="hibernate.connection.url"
value="jdbc:sybase:Tds:same as in my app"/>
| <property name="hibernate.max_fetch_depth" value="3"/>
| </properties>
| </persistence-unit>
| </persistence>
|
or the programmatic way:
| HashMap map = new HashMap();
|
| map.put("hibernate.connection.driver_class",
"com.sybase.jdbc2.jdbc.SybDriver");
| map.put("hibernate.connection.url",
"jdbc:sybase:Tds:localhost:same as in my app");
| map.put("hibernate.connection.username", "...");
| map.put("hibernate.connection.password", "...");
|
| emf = Persistence.createEntityManagerFactory("test",map);
|
it always goes as far as:
| 21.03.2006 10:33:09 org.hibernate.cfg.Environment <clinit>
| INFO: Hibernate 3.1
| 21.03.2006 10:33:09 org.hibernate.cfg.Environment <clinit>
| INFO: hibernate.properties not found
| 21.03.2006 10:33:09 org.hibernate.cfg.Environment <clinit>
| INFO: using CGLIB reflection optimizer
| 21.03.2006 10:33:09 org.hibernate.cfg.Environment <clinit>
| INFO: using JDK 1.4 java.sql.Timestamp handling
|
and then i get a persistenceException: no provider for entity manager named
test.
please help me, i don't know what i have forgotten...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3931860#3931860
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3931860
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user