oohh salah ketik ternyata.. sudah jalan mas... terimakasih
sebenernya concern nya bukan dsini sih.
ketika saya pake OpenJPA kenapa ga jalan yah?
padahal di Tomcat jalan....
berikut settingan di persistence.xml nya
<persistence-unit name="testce">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>java:comp/env/jdbc/testwasce</jta-data-source>
<class>test.EntityClass</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
<property name="openjpa.jdbc.DBDictionary" value="db2" />
</properties>
</persistence-unit>
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<jta-data-source>java:comp/env/jdbc/testwasce</jta-data-source>
<class>test.EntityClass</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="openjpa.RuntimeUnenhancedClasses" value="supported" />
<property name="openjpa.jdbc.DBDictionary" value="db2" />
</properties>
</persistence-unit>
dan penampakan errornya seperti ini:
Error 500: <openjpa-1.2.3-SNAPSHOT-r422266:1152904 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: There were errors initializing your configuration: <openjpa-1.2.3-SNAPSHOT-r422266:1152904 fatal user error> org.apache.openjpa.util.UserException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property. at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:74) at
Error 500: <openjpa-1.2.3-SNAPSHOT-r422266:1152904 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: There were errors initializing your configuration: <openjpa-1.2.3-SNAPSHOT-r422266:1152904 fatal user error> org.apache.openjpa.util.UserException: A JDBC Driver or DataSource class name must be specified in the ConnectionDriverName property. at org.apache.openjpa.jdbc.schema.DataSourceFactory.newDataSource(DataSourceFactory.java:74) at
apa ada yang salah yah di settingannya ?
terimakasih banyak sebelumnya :)
Nanda
From: adi sembiring <sembiring.adi@gmail.com>
To: jug-indonesia@yahoogroups.com
Sent: Wednesday, October 26, 2011 11:45 AM
Subject: Re: [JUG-Indonesia] indirect jndi tidak jalan websphere
Btw akses jndi nya masih di aplikasii yang di deploy di websphere kan?
seingat saya (Context)initContext.lookup("java:/comp/env"); harusnya (Context)initContext.lookup("java:comp/env");
Atau bisa langsung, tanpa init:
seingat saya (Context)initContext.lookup("java:/comp/env"); harusnya (Context)initContext.lookup("java:comp/env");
Atau bisa langsung, tanpa init:
Context initContext = new InitialContext();
DataSource ds = (DataSource)initContext .lookup("java:comp/env/jdbc/testwasce");
Connection conn = ds.getConnection();
DataSource ds = (DataSource)initContext .lookup("java:comp/env/jdbc/testwasce");
Connection conn = ds.getConnection();
Kalau tidak berhasil coba:
Hashtable parms = new Hashtable();
parms.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
InitialContext ctx = new InitialContext(parms);
DataSource ds = (DataSource)initContext .lookup("java:comp/env/jdbc/testwasce");
Connection conn = ds.getConnection();
Ref:parms.put(Context.INITIAL_CONTEXT_FACTORY,
"com.ibm.websphere.naming.WsnInitialContextFactory");
InitialContext ctx = new InitialContext(parms);
DataSource ds = (DataSource)initContext .lookup("java:comp/env/jdbc/testwasce");
Connection conn = ds.getConnection();
http://publib.boulder.ibm.com/infocenter/wsdoc400/v6r0/index.jsp?topic=/com.ibm.websphere.iseries.doc/info/ae/ae/rdat_dawp04.html
__._,_.___
====
Jangan lupa untuk bergabung ke codeandroid-id@googlegroups.com, untuk diskusi fokus mengenai pengembangan aplikasi sekitar android. email pendaftaran ke codeandroid-id-subscribe@googlegroups.com.
Webnya http://www.codeandroid.or.id
===
Kalau mau keluar dari mailing list ini, caranya kirim sebuah email ke jug-indonesia-unsubscribe@yahoogroups.com.
Jangan lupa, website JUG Indonesia adalah http://www.jug.or.id
Jangan lupa untuk bergabung ke codeandroid-id@googlegroups.com, untuk diskusi fokus mengenai pengembangan aplikasi sekitar android. email pendaftaran ke codeandroid-id-subscribe@googlegroups.com.
Webnya http://www.codeandroid.or.id
===
Kalau mau keluar dari mailing list ini, caranya kirim sebuah email ke jug-indonesia-unsubscribe@yahoogroups.com.
Jangan lupa, website JUG Indonesia adalah http://www.jug.or.id
MARKETPLACE
.
__,_._,___
No comments:
Post a Comment