I've generated my skeleton website and I can not find nor insert into the
database. I'm using MySql. Here is a table that I'm using:
CREATE TABLE HEALTHTRACKDB.WeanInformation(
WeanInformationID VARCHAR (50),
CalveMarketing VARCHAR(50),
EstimatedWeanDate VARCHAR(50),
EstimatedWeanWeight VARCHAR(50),
PRIMARY KEY (WeanInformationID)
);
I generate code for it and deploy it. The website works fine until I try to
retrieve or enter data into the database and I get many exceptions but I think
this is the one that probably defines my reall problem:
2006-03-13 18:39:39,312 DEBUG [org.hibernate.jdbc.ConnectionManager] opening
JDBC connection
| 2006-03-13 18:39:39,312 DEBUG [org.hibernate.SQL] select
weaninform0_.WeanInformationID as WeanInfo1_11_0_, weaninform0_.CalveMarketing
as CalveMar2_11_0_, weaninform0_.EstimatedWeanDate as Estimate3_11_0_,
weaninform0_.EstimatedWeanWeight as Estimate4_11_0_ from
healthtrackdb.weaninformation weaninform0_ where
weaninform0_.WeanInformationID=?
| 2006-03-13 18:39:39,312 INFO [STDOUT] Hibernate: select
weaninform0_.WeanInformationID as WeanInfo1_11_0_, weaninform0_.CalveMarketing
as CalveMar2_11_0_, weaninform0_.EstimatedWeanDate as Estimate3_11_0_,
weaninform0_.EstimatedWeanWeight as Estimate4_11_0_ from
healthtrackdb.weaninformation weaninform0_ where
weaninform0_.WeanInformationID=?
| 2006-03-13 18:39:39,312 DEBUG [org.hibernate.util.JDBCExceptionReporter]
could not load an entity: [com.mfa.demo.Weaninformation#990099] [select
weaninform0_.WeanInformationID as WeanInfo1_11_0_, weaninform0_.CalveMarketing
as CalveMar2_11_0_, weaninform0_.EstimatedWeanDate as Estimate3_11_0_,
weaninform0_.EstimatedWeanWeight as Estimate4_11_0_ from
healthtrackdb.weaninformation weaninform0_ where
weaninform0_.WeanInformationID=?]
| java.sql.SQLException: invalid schema name: HEALTHTRACKDB in statement
[select weaninform0_.WeanInformationID as WeanInfo1_11_0_,
weaninform0_.CalveMarketing as CalveMar2_11_0_, weaninform0_.EstimatedWeanDate
as Estimate3_11_0_, weaninform0_.EstimatedWeanWeight as Estimate4_11_0_ from
healthtrackdb.weaninformation weaninform0_ where
weaninform0_.WeanInformationID=?]
| | at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| | at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source)
| | at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown
Source)
| | at
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.doPrepareStatement(BaseWrapperManagedConnection.java:346)
| | at
org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:334)
| | at
org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:187)
| | at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:442)
| | at
org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
| | at
org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
| | at
org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
| | at org.hibernate.loader.Loader.doQuery(Loader.java:661)
| | at
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
| | at org.hibernate.loader.Loader.loadEntity(Loader.java:1785)
| | at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:93)
| | at
org.hibernate.loader.entity.AbstractEntityLoader.load(AbstractEntityLoader.java:81)
| | at
org.hibernate.persister.entity.AbstractEntityPersister.load(AbstractEntityPersister.java:2730)
| | at
org.hibernate.event.def.DefaultLoadEventListener.loadFromDatasource(DefaultLoadEventListener.java:365)
| | at
org.hibernate.event.def.DefaultLoadEventListener.doLoad(DefaultLoadEventListener.java:346)
| | at
org.hibernate.event.def.DefaultLoadEventListener.load(DefaultLoadEventListener.java:123)
| | at
org.hibernate.event.def.DefaultLoadEventListener.proxyOrLoad(DefaultLoadEventListener.java:177)
| | at
org.hibernate.event.def.DefaultLoadEventListener.onLoad(DefaultLoadEventListener.java:87)
| | at org.hibernate.impl.SessionImpl.fireLoad(SessionImpl.java:891)
| | at org.hibernate.impl.SessionImpl.get(SessionImpl.java:828)
| | at org.hibernate.impl.SessionImpl.get(SessionImpl.java:821)
| | at
org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:102)
| | at
com.mfa.demo.WeaninformationEditorBean.create(WeaninformationEditorBean.java:70)
| | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| | at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| | at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| | at java.lang.reflect.Method.invoke(Method.java:585)
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3929955#3929955
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3929955
-------------------------------------------------------
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