I'm trying to migrate a J2EE application from WebLogic to WebSphere 5.1 but
having problems with making it work with MySQL database.
I created a MySQL JDBC provider - configured with the
com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource implementation
class, and created a data source configured with the
com.ibm.websphere.rsadapter.GenericDataStoreHelper helper class.
The connection test to the data source passes successfully.
MySQL version is 4.0.18
MySQL Connector version is 3.0.11
The log file stack trace indicates that there a syntax error in the SQL
code:
[3/28/04 19:34:59:406 EST] 52731e3 ExceptionUtil E CNTR0020E:
Non-application exception occurred while processing method "getAllEntries"
on bean "BeanId(Homepage#homepage-ejb.jar#GuestbookFacade, null)". Exception
data: javax.ejb.EJBException: nested exception is:
javax.ejb.TransactionRolledbackLocalException: ; nested exception is:
javax.ejb.EJBException: nested exception is:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
[...]
java.sql.SQLException: Syntax error or access violation, message from
server: "You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'"ID", q1."RATING", q1."COMMENT1", q1."DATE1", q1."GUESTBOOK"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
[...]
The above error occurs when a finder method (findAll()) is called upon a CMP
Entity Bean. It seems like an incorrect SQL code was generated at the
deployment time (I chose SQL99 option). The EJB-QL from ejb-jar.xml is:
SELECT OBJECT(e) FROM GuestbookEntry e
Again, it was tested before and was running without any problems on
WebLogic.
Has anyone had the same problem?
Thanks in advance for your help,
Lukasz
I wonder if you use the WebSphere to deployed the code w/o creating a schema
mapping first. If there is no predefined schema mapping, Websphere is using
top-down mapping, which it may choose a Database column name different from
the CMP-FIELD name. I see:
> '"ID", q1."RATING", q1."COMMENT1", q1."DATE1", q1."GUESTBOOK"
Are "COMMENT1" and "DATE1" your database table columns?
It is better to have a full SQL exception. Then we know exactly what the
JDBC is complaining about.
Take care.
Yang.
"Lukasz Szelag" <javag...@hotmail.com> wrote in message
news:ObKdnbFB9IN...@comcast.com...
We had the same problem when using oracle. We finally resorted to
letting ejbdeploy do itsthing but telling it to keep the generated
files, then regexing the <bean name>FunctionSet_*.java files to correct
the offending queries. Pretty much look for any select statement the
has '\"' in it. We then recompiled the files and create a new jar with
the corrected classes. Works great. We've looked for bug posts, it
seemed to be a problem in 4.x - so I guess it wasn't fixed. The pattern
seems to be any non primary key finder method causes incorrect sql to
be generated.
Michael.
Lukasz Szelag wrote:
> *Hello,
> Lukasz *
--
mdroth
------------------------------------------------------------------------
Posted via http://www.webservertalk.com
------------------------------------------------------------------------
View this thread: http://www.webservertalk.com/message165165.html
Thanks for your comments. Unfortunately, what you propose is not a walk
around for me. I'm relying on an automatic build process, which precludes
any manual modifications to the source code.
Lukasz
"mdroth" <mdroth...@mail.webservertalk.com> wrote in message
news:mdroth...@mail.webservertalk.com...
I'm not creating a Schema.dbxmi file myself, assuming that this file is
properly generated during the deployment process. I'm not sure though if the
generated file is correct. Both "COMMENT1" and "DATE1" are incorrect names.
These fields' names are not suffixed by "1".
Please see included Schema.dbxmi, SQL DDL file that I use to setup the
database tables and full exception stack trace. I greatly appreciate your
help.
Thanks,
Lukasz
Schema.dbxmi:
<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"
xmlns:RDBSchema="RDBSchema.xmi">
<RDBSchema:RDBDatabase xmi:id="RDBDatabase_1" name="TopDownDB"
tableGroup="RDBTable_1 RDBTable_2">
<dataTypeSet href="UDBV7_Primitives.xmi#SQLPrimitives_1"/>
</RDBSchema:RDBDatabase>
<RDBSchema:RDBTable xmi:id="RDBTable_GuestbookEntry" name=""
primaryKey="GuestbookEntry_PRIMARYKEY" database="RDBDatabase_1">
<namedGroup xmi:type="RDBSchema:SQLReference"
xmi:id="GuestbookEntry_PRIMARYKEY" members="------RDBColumn_1"
table="RDBTable_GuestbookEntry" constraint="Constraint_GuestbookEntry_"/>
<columns xmi:id="GuestbookEntry_id" name="id">
</columns>
<columns xmi:id="GuestbookEntry_rating" name="rating">
</columns>
<columns xmi:id="GuestbookEntry_comment" name="comment">
</columns>
<columns xmi:id="GuestbookEntry_date" name="date">
</columns>
</RDBSchema:RDBTable>
<RDBSchema:RDBTable xmi:id="RDBTable_GuestbookUser" name=""
primaryKey="GuestbookUser_PRIMARYKEY" database="RDBDatabase_1">
<namedGroup xmi:type="RDBSchema:SQLReference"
xmi:id="GuestbookUser_PRIMARYKEY" members="------RDBColumn_1"
table="RDBTable_GuestbookUser" constraint="Constraint_GuestbookUser_"/>
<columns xmi:id="GuestbookUser_id" name="id">
</columns>
<columns xmi:id="GuestbookUser_name" name="name">
</columns>
<columns xmi:id="GuestbookUser_sex" name="sex">
</columns>
</RDBSchema:RDBTable>
<RDBSchema:RDBTable xmi:id="RDBTable_Sequence" name=""
primaryKey="Sequence_PRIMARYKEY" database="RDBDatabase_1">
<namedGroup xmi:type="RDBSchema:SQLReference" xmi:id="Sequence_PRIMARYKEY"
members="------RDBColumn_1" table="RDBTable_Sequence"
constraint="Constraint_Sequence_"/>
<columns xmi:id="Sequence_name" name="name">
</columns>
<columns xmi:id="Sequence_currentKeyValue" name="currentKeyValue">
</columns>
</RDBSchema:RDBTable>
</xmi:XMI>
SQL DDL file that I use to setup the database:
DROP DATABASE IF EXISTS homepage;
CREATE DATABASE homepage;
GRANT ALL ON homepage.* TO luk@'%';
USE homepage;
CREATE TABLE sequence (
name VARCHAR(30) NOT NULL PRIMARY KEY,
current_key_value INT NOT NULL
);
CREATE TABLE guestbook_user (
id INT NOT NULL PRIMARY KEY,
name VARCHAR(20) NOT NULL,
sex INT NULL
) TYPE=InnoDB;
CREATE TABLE guestbook_entry (
id INT NOT NULL PRIMARY KEY,
guestbook_user_id INT NOT NULL,
rating INT NULL,
comment VARCHAR(120) NOT NULL,
date DATETIME NOT NULL,
INDEX (guestbook_user_id),
FOREIGN KEY (guestbook_user_id) REFERENCES guestbook_user(id) ON DELETE
CASCADE
) TYPE=InnoDB;
Full exception stack trace:
[3/28/04 21:41:03:266 EST] 1592f1e3 ExceptionUtil E CNTR0020E:
Non-application exception occurred while processing method "getAllEntries"
on bean "BeanId(Homepage#homepage-ejb.jar#GuestbookFacade, null)". Exception
data: javax.ejb.EJBException: nested exception is:
javax.ejb.TransactionRolledbackLocalException: ; nested exception is:
javax.ejb.EJBException: nested exception is:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
javax.ejb.TransactionRolledbackLocalException: ; nested exception is:
javax.ejb.EJBException: nested exception is:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
javax.ejb.EJBException: nested exception is:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
at
com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(Unknown
Source)
at
com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensi
onImpl.executeQuery(Unknown Source)
at
com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensi
onImpl.executeFind(Unknown Source)
at
com.szelag.homepage.domain.ejb.ConcreteGuestbookEntry_1002c5c1.ejbFindAll_Lo
cal(Unknown Source)
at
com.szelag.homepage.domain.ejb.interfaces.EJSCMPGuestbookEntryHomeBean_1002c
5c1.findAll_Local(Unknown Source)
at
com.szelag.homepage.domain.ejb.interfaces.EJSLocalCMPGuestbookEntryHome_1002
c5c1.findAll(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.GuestbookFacadeBean.getAllEntries
(GuestbookFacadeBean.java:176)
at
com.szelag.homepage.services.guestbook.ejb.interfaces.EJSRemoteStatelessGues
tbookFacade_129461e4.getAllEntries(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.interfaces._GuestbookFacade_Stub.
getAllEntries(_GuestbookFacade_Stub.java:355)
at
com.szelag.homepage.application.guestbook.GuestbookEJBDelegate.getAllEntries
(GuestbookEJBDelegate.java:62)
at
com.szelag.homepage.application.struts.actions.GuestbookAction.view(Guestboo
kAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
280)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:480)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
tInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
cleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
let.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
leServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidSer
vletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletIns
tanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
tDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
Dispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
achedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
uestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
r.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
a:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Caused by: java.sql.SQLException: Syntax error or access violation, message
from server: "You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'"ID", q1."RATING", q1."COMMENT1", q1."DATE1", q1."GUESTBOOK"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496)
at
com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeQuery(Prepared
StatementWrapper.java:685)
at
com.szelag.homepage.domain.ejb.websphere_deploy.SQL92_1.GuestbookEntryBeanFu
nctionSet_1002c5c1.FindAll(Unknown Source)
at
com.szelag.homepage.domain.ejb.websphere_deploy.SQL92_1.GuestbookEntryBeanFu
nctionSet_1002c5c1.execute(Unknown Source)
at
com.ibm.ws.rsadapter.cci.WSInteractionImpl.execute(WSInteractionImpl.java:41
7)
at
com.ibm.wsspi.ejbpersistence.WSEJBToRAAdapter.executeFinder(WSEJBToRAAdapter
.java:149)
at
com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter.executeFinder(WSRelationalRAA
dapter.java:174)
... 42 more
---- Begin backtrace for nested exception
java.sql.SQLException: Syntax error or access violation, message from
server: "You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'"ID", q1."RATING", q1."COMMENT1", q1."DATE1", q1."GUESTBOOK"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1905)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1109)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1203)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2090)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1496)
at
com.mysql.jdbc.jdbc2.optional.PreparedStatementWrapper.executeQuery(Prepared
StatementWrapper.java:685)
at
com.szelag.homepage.domain.ejb.websphere_deploy.SQL92_1.GuestbookEntryBeanFu
nctionSet_1002c5c1.FindAll(Unknown Source)
at
com.szelag.homepage.domain.ejb.websphere_deploy.SQL92_1.GuestbookEntryBeanFu
nctionSet_1002c5c1.execute(Unknown Source)
at
com.ibm.ws.rsadapter.cci.WSInteractionImpl.execute(WSInteractionImpl.java:41
7)
at
com.ibm.wsspi.ejbpersistence.WSEJBToRAAdapter.executeFinder(WSEJBToRAAdapter
.java:149)
at
com.ibm.ws.rsadapter.cci.WSRelationalRAAdapter.executeFinder(WSRelationalRAA
dapter.java:174)
at
com.ibm.ws.ejbpersistence.dataaccess.DataAccessRequestImpl.execute(Unknown
Source)
at
com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensi
onImpl.executeQuery(Unknown Source)
at
com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensi
onImpl.executeFind(Unknown Source)
at
com.szelag.homepage.domain.ejb.ConcreteGuestbookEntry_1002c5c1.ejbFindAll_Lo
cal(Unknown Source)
at
com.szelag.homepage.domain.ejb.interfaces.EJSCMPGuestbookEntryHomeBean_1002c
5c1.findAll_Local(Unknown Source)
at
com.szelag.homepage.domain.ejb.interfaces.EJSLocalCMPGuestbookEntryHome_1002
c5c1.findAll(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.GuestbookFacadeBean.getAllEntries
(GuestbookFacadeBean.java:176)
at
com.szelag.homepage.services.guestbook.ejb.interfaces.EJSRemoteStatelessGues
tbookFacade_129461e4.getAllEntries(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.interfaces._GuestbookFacade_Stub.
getAllEntries(_GuestbookFacade_Stub.java:355)
at
com.szelag.homepage.application.guestbook.GuestbookEJBDelegate.getAllEntries
(GuestbookEJBDelegate.java:62)
at
com.szelag.homepage.application.struts.actions.GuestbookAction.view(Guestboo
kAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
280)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:480)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
tInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
cleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
let.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
leServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidSer
vletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletIns
tanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
tDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
Dispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
achedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
uestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
r.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
a:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
javax.ejb.EJBException: nested exception is:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
at
com.ibm.ws.ejbpersistence.beanextensions.ConcreteBeanStatefulInstanceExtensi
onImpl.executeFind(Unknown Source)
at
com.szelag.homepage.domain.ejb.ConcreteGuestbookEntry_1002c5c1.ejbFindAll_Lo
cal(Unknown Source)
at
com.szelag.homepage.domain.ejb.interfaces.EJSCMPGuestbookEntryHomeBean_1002c
5c1.findAll_Local(Unknown Source)
at
com.szelag.homepage.domain.ejb.interfaces.EJSLocalCMPGuestbookEntryHome_1002
c5c1.findAll(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.GuestbookFacadeBean.getAllEntries
(GuestbookFacadeBean.java:176)
at
com.szelag.homepage.services.guestbook.ejb.interfaces.EJSRemoteStatelessGues
tbookFacade_129461e4.getAllEntries(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.interfaces._GuestbookFacade_Stub.
getAllEntries(_GuestbookFacade_Stub.java:355)
at
com.szelag.homepage.application.guestbook.GuestbookEJBDelegate.getAllEntries
(GuestbookEJBDelegate.java:62)
at
com.szelag.homepage.application.struts.actions.GuestbookAction.view(Guestboo
kAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
280)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:480)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
tInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
cleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
let.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
leServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidSer
vletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletIns
tanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
tDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
Dispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
achedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
uestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
r.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
a:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
javax.ejb.TransactionRolledbackLocalException: ; nested exception is:
javax.ejb.EJBException: nested exception is:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
at
com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSIException(LocalExc
eptionMappingStrategy.java:96)
at
com.ibm.ejs.container.LocalExceptionMappingStrategy.mapException(LocalExcept
ionMappingStrategy.java:165)
at
com.ibm.ejs.container.LocalExceptionMappingStrategy.mapCSITransactionRolledB
ackException(LocalExceptionMappingStrategy.java:293)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3128)
at
com.szelag.homepage.domain.ejb.interfaces.EJSLocalCMPGuestbookEntryHome_1002
c5c1.findAll(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.GuestbookFacadeBean.getAllEntries
(GuestbookFacadeBean.java:176)
at
com.szelag.homepage.services.guestbook.ejb.interfaces.EJSRemoteStatelessGues
tbookFacade_129461e4.getAllEntries(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.interfaces._GuestbookFacade_Stub.
getAllEntries(_GuestbookFacade_Stub.java:355)
at
com.szelag.homepage.application.guestbook.GuestbookEJBDelegate.getAllEntries
(GuestbookEJBDelegate.java:62)
at
com.szelag.homepage.application.struts.actions.GuestbookAction.view(Guestboo
kAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
280)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:480)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
tInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
cleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
let.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
leServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidSer
vletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletIns
tanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
tDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
Dispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
achedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
uestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
r.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
a:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
javax.ejb.EJBException: nested exception is:
javax.ejb.TransactionRolledbackLocalException: ; nested exception is:
javax.ejb.EJBException: nested exception is:
com.ibm.ws.ejbpersistence.utilpm.PersistenceManagerException: PMGR6022E:
Error using adapter to create or execute an Interaction.
com.ibm.ws.rsadapter.cci.WSInteractionImpl@7b2d31f1
at
com.szelag.homepage.services.guestbook.ejb.GuestbookFacadeBean.getAllEntries
(GuestbookFacadeBean.java:179)
at
com.szelag.homepage.services.guestbook.ejb.interfaces.EJSRemoteStatelessGues
tbookFacade_129461e4.getAllEntries(Unknown Source)
at
com.szelag.homepage.services.guestbook.ejb.interfaces._GuestbookFacade_Stub.
getAllEntries(_GuestbookFacade_Stub.java:355)
at
com.szelag.homepage.application.guestbook.GuestbookEJBDelegate.getAllEntries
(GuestbookEJBDelegate.java:62)
at
com.szelag.homepage.application.struts.actions.GuestbookAction.view(Guestboo
kAction.java:64)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79
)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java(Compiled Code))
at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
at
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:
280)
at
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces
sor.java:480)
at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420)
at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:502)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServle
tInstance.java:110)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecy
cleServlet.java:174)
at
com.ibm.ws.webcontainer.servlet.IdleServletState.service(StrictLifecycleServ
let.java:313)
at
com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecyc
leServlet.java:116)
at
com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java
:283)
at
com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidSer
vletReferenceState.java:42)
at
com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletIns
tanceReference.java:40)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(
WebAppRequestDispatcher.java:974)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppReques
tDispatcher.java:555)
at
com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequest
Dispatcher.java:200)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:119)
at
com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker
.java:276)
at
com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(C
achedInvocation.java:71)
at
com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletReq
uestProcessor.java:182)
at
com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListene
r.java:334)
at
com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.jav
a:56)
at
com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:618)
at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:443)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java(Compiled Code))
Felix
We too are using a 'very' automated build procedure. In fact everything
is done through at. We created our own ant target to run ejbdeploy and
then do the regex (its built into ant). We also wrote our own websphere
5.1 xdoclet module to do the ejb descriptor generation. It will work,
we have ~300 or so bean using the process.
Good luck.
Michael
Lukasz Szelag wrote:
> *Hi Michael,
>Hi Lukasz
>
>We too are using a 'very' automated build procedure. In fact everything
>is done through at. We created our own ant target to run ejbdeploy and
>then do the regex (its built into ant). We also wrote our own websphere
>5.1 xdoclet module to do the ejb descriptor generation. It will work,
>we have ~300 or so bean using the process.
>
>Good luck.
>Michael
>Lukasz Szelag wrote:
>
>
Would you PLEASE submit your xdoclet code to the xdoclet project? There
are a lot of people crying for it!
Ken
I think that my problem results from lack of EJB CMP support for WebSphere
in XDoclet at this moment. It seems like the generic @ejb.persistence
table-name tag is not used by XDoclet when generating Schema.dbxmi. I don't
know why there is another tag specific to WebSphere: @websphere.mapping
table-name. The documentation doesn't cover this at all. Anyways, even
though I'm using both tags right now, so the table names in Schema.dbxmi
seem to be fine, i.e:
<RDBSchema:RDBTable xmi:id="RDBTable_GuestbookUser" name="guestbook_user"
primaryKey="GuestbookUser_PRIMARYKEY" database="RDBDatabase_1">
(GUESTBOOK_ENTRY)
Still though, after I deploy my application and look into the generated ear
file (/ejb-module.jar/META-INF/backends/SQL99_1/Table.ddl) the table names
(as well as columns) are invalid, i.e.:
CREATE TABLE GUESTBOOKENTRY <---- not GUESTBOOK_ENTRY
(ID INTEGER NOT NULL,
RATING INTEGER NOT NULL,
COMMENT1 CHARACTER VARYING(250),
DATE1 TIMESTAMP(2),
GUESTBOOKUSER_ID INTEGER);
BTW. Is is OK to place Schema.dbxmi directly under META-INF, or should it be
rather under META-INF/Schema/?
My guess is that the reason for columns to be mapped incorrectly is lack of
Map.dbxmi file which is never generated since XDoclet doesn't provide any
method level tags that would allow to map fields to column names (as
@ejb.persistence table-name does for table names).
As someone already mentioned in this thread it would be great if you could
submit your XDoclet code to be incorporated into the main distribution ;) It
would make life a lot easier for all of us strugling with this problem.
Thanks,
Lukasz
"Felix Wong" <fmh...@ca.ibm.com> wrote in message
news:c4ep4h$8hdk$1...@news.boulder.ibm.com...