Forums Register Login

Need Help regarding OpenEJB's error

+Pie Number of slices to send: Send
Hello friends..

i was trying to do practice about OpenEJB which use MySQL as database server..
but i got error..
i am confused for the strange error..

here is my Simple Entity Bean :



and here is my persistence.xml :


and here is the message error :


ERRRRRRRRRRRRORThe bean encountered a non-application exception; nested exception is:
<openjpa-1.2.1-r752877:753278 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: There were errors initializing your configuration: <openjpa-1.2.1-r752877:753278 fatal user error> org.apache.openjpa.util.UserException: A connection could not be obtained for driver class "com.mysql.jdbc.Driver" and URL "jdbc:mysql://127.0.0.1:3306/MyExample". You may have specified an invalid URL.
at org.apache.openjpa.jdbc.schema.DataSourceFactory.newConnectException(DataSourceFactory.java:256)
at org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:242)
at org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl.getConnectionFactory(JDBCConfigurationImpl.java:692)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
......


Caused by: java.lang.UnsupportedOperationException: Not supported by BasicDataSource
at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:902)
at org.apache.openjpa.lib.jdbc.DelegatingDataSource.getConnection(DelegatingDataSource.java:113)
at org.apache.openjpa.lib.jdbc.DecoratingDataSource.getConnection(DecoratingDataSource.java:93)
at org.apache.openjpa.jdbc.schema.DataSourceFactory.installDBDictionary(DataSourceFactory.java:234)
... 39 more



when i tried to persist data i got the error..

Please give me any suggestion..

Thanks in advance sir...
Ruth Stout was famous for gardening naked. Just like this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1523 times.
Similar Threads
spring wont inject the entitymanager
persistence provider not found
JPA-hibernate-spring config
Hibernate dialect
JPA: Unable to configure EntityManagerFactory
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 02:30:48.