WoodrowS (4) [Avatar] Offline
#1
Forum Community,

Does anyone have any ideas on how to run the Chapter 2 example on WebLogic 10.3? The problem is related to JPA; the following output was generated with using "ant -verbose -debug run":

C:TEMPTestWLS>echo set env
set env

C:TEMPTestWLS>call "C:oracleMiddlewareuser_projectsdomainsdev_adf_domain1insetDomainEnv.cmd"
adding table and building schema
1656 actionBazaar INFO [main] openjpa.jdbc.JDBC - Using dictionary class "kodo.jdbc.sql.KodoOracleDictionary" (Oracle Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options ,Oracle JDBC driver 11.1.0.7.0-Production).
1688 actionBazaar INFO [main] openjpa.Runtime - Creating sequence table.
1828 actionBazaar WARN [main] openjpa.jdbc.Schema - ORA-00955: name is already used by an existing object
{stmnt 11 CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID NUMBER NOT NULL, SEQUENCE_VALUE NUMBER, PRIMARY KEY (ID))} [code=955, state=42000]
org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00955: name is already used by an existing object
{stmnt 11 CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID NUMBER NOT NULL, SEQUENCE_VALUE NUMBER, PRIMARY KEY (ID))} [code=955, state=42000]
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingStatement.executeUpdate(LoggingConnectionDecorator.java:762)
at org.apache.openjpa.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1185)
at org.apache.openjpa.jdbc.schema.SchemaTool.createTable(SchemaTool.java:949)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.refreshTable(TableJDBCSeq.java:570)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.run(TableJDBCSeq.java:660)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.run(TableJDBCSeq.java:640)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq$1.run(TableJDBCSeq.java:622)
at org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:705)
at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:695)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.main(TableJDBCSeq.java:617)
31 actionBazaar INFO [main] openjpa.Tool - No targets were given. Running on all classes listed in your configuration, or all persistent classes in the classpath if no classes are configured. Use -help to display tool usage information.
1797 actionBazaar INFO [main] openjpa.jdbc.JDBC - Using dictionary class "kodo.jdbc.sql.KodoOracleDictionary" (Oracle Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options ,Oracle JDBC driver 11.1.0.7.0-Production).
4937 actionBazaar INFO [main] openjpa.Tool - Mapping tool running on type "class ejb3inaction.example.persistence.Bid" with action "buildSchema".
5093 actionBazaar INFO [main] openjpa.Tool - Recording mapping and schema changes.
Exception in thread "main" <openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.util.GeneralException: ORA-00955: name is already used by an existing object
{stmnt 29 CREATE TABLE BIDS (BID_ID NUMBER NOT NULL, BID_DATE DATE, BID_PRICE NUMBER, BID_BIDDER VARCHAR2(255), BID_ITEM_ID NUMBER, PRIMARY KEY (BID_ID))} [code=955, state=42000]
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:553)
at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:1075)
at org.apache.openjpa.jdbc.meta.MappingTool.run(MappingTool.java:986)
at org.apache.openjpa.jdbc.meta.MappingTool$1.run(MappingTool.java:927)
at org.apache.openjpa.lib.conf.Configurations.launchRunnable(Configurations.java:705)
at org.apache.openjpa.lib.conf.Configurations.runAgainstAllAnchors(Configurations.java:695)
at org.apache.openjpa.jdbc.meta.MappingTool.main(MappingTool.java:922)
Caused by: org.apache.openjpa.lib.jdbc.ReportingSQLException: ORA-00955: name is already used by an existing object
{stmnt 29 CREATE TABLE BIDS (BID_ID NUMBER NOT NULL, BID_DATE DATE, BID_PRICE NUMBER, BID_BIDDER VARCHAR2(255), BID_ITEM_ID NUMBER, PRIMARY KEY (BID_ID))} [code=955, state=42000]
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:192)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:57)
at org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator$LoggingConnection$LoggingStatement.executeUpdate(LoggingConnectionDecorator.java:762)
at org.apache.openjpa.jdbc.schema.SchemaTool.executeSQL(SchemaTool.java:1185)
at org.apache.openjpa.jdbc.schema.SchemaTool.createTable(SchemaTool.java:949)
at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:526)
at org.apache.openjpa.jdbc.schema.SchemaTool.add(SchemaTool.java:344)
at org.apache.openjpa.jdbc.schema.SchemaTool.run(SchemaTool.java:321)
at org.apache.openjpa.jdbc.meta.MappingTool.record(MappingTool.java:501)
... 6 more
compile the java
run the java
Context lookup successful.
Bid object successfully created.
Bid object successfully initialized.
javax.ejb.EJBException: EJB Exception: ; nested exception is:
<openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run:
java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add; nested exception is: <openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run:
java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add
<openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run:
java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add
at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4207)
at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4171)
at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:401)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:266)
at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60)
at org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)
at org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:593)
at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:464)
at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:440)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:577)
at kodo.jdbc.kernel.KodoJDBCStoreManager.assignObjectId(KodoJDBCStoreManager.java:33)
at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:51smilie
at org.apache.openjpa.kernel.StateManagerImpl.assignField(StateManagerImpl.java:607)
at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManagerImpl.java:1492)
at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1475)
at ejb3inaction.example.persistence.Bid.getBidId(Bid.java)
at ejb3inaction.example.buslogic.PlaceBidBean.addBid(PlaceBidBean.java:24)
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:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy126.addBid(Unknown Source)
at ejb3inaction.example.buslogic.PlaceBid_iazuv0_PlaceBidImpl.addBid(PlaceBid_iazuv0_PlaceBidImpl.java:56)
at ejb3inaction.example.buslogic.PlaceBid_iazuv0_PlaceBidImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:11smilie
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.Exception: java.sql.SQLException: There is no row for mapping "ejb3inaction.example.persistence.Bid" in sequence table "OPENJPA_SEQUENCE_TABLE", and the attempt to insert a row has apparently failed.
at org.apache.openjpa.util.Exceptions.replaceNestedThrowables(Exceptions.java:249)
at org.apache.openjpa.persistence.PersistenceException.writeObject(PersistenceException.java:100)
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:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:61smilie
at weblogic.rjvm.MsgAbbrevOutputStream.sendThrowable(MsgAbbrevOutputStream.java:471)
at weblogic.rmi.internal.BasicServerRef.handleThrowable(BasicServerRef.java:711)
at weblogic.rmi.internal.BasicServerRef.postInvoke(BasicServerRef.java:650)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:492)
... 3 more
javax.ejb.EJBException: EJB Exception: ; nested exception is:
<openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run:
java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add; nested exception is: <openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run:
java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.unwrapRemoteException(RemoteBusinessIntfProxy.java:120)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.invoke(RemoteBusinessIntfProxy.java:102)
at $Proxy0.addBid(Unknown Source)
at ejb3inaction.example.buslogic.PlaceBidClient.main(PlaceBidClient.java:20)
Caused by: <openjpa-1.1.1-SNAPSHOT-r422266:891341 nonfatal general error> org.apache.openjpa.persistence.PersistenceException: Attempt to update the sequence table "OPENJPA_SEQUENCE_TABLE" failed. The sequence table is typically created when you run the mappingtool's refresh action on any datastore identity class. If you have not run the mappingtool but want to create the sequence table, run:
java org.apache.openjpa.jdbc.kernel.TableJDBCSeq -action add
at org.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4207)
at org.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4171)
at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:102)
at org.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:80)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.allocateSequence(TableJDBCSeq.java:401)
at org.apache.openjpa.jdbc.kernel.TableJDBCSeq.nextInternal(TableJDBCSeq.java:266)
at org.apache.openjpa.jdbc.kernel.AbstractJDBCSeq.next(AbstractJDBCSeq.java:60)
at org.apache.openjpa.util.ImplHelper.generateValue(ImplHelper.java:160)
at org.apache.openjpa.util.ImplHelper.generateFieldValue(ImplHelper.java:144)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignField(JDBCStoreManager.java:593)
at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:464)
at org.apache.openjpa.util.ApplicationIds.assign(ApplicationIds.java:440)
at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.assignObjectId(JDBCStoreManager.java:577)
at kodo.jdbc.kernel.KodoJDBCStoreManager.assignObjectId(KodoJDBCStoreManager.java:33)
at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
at org.apache.openjpa.kernel.DelegatingStoreManager.assignObjectId(DelegatingStoreManager.java:134)
at org.apache.openjpa.kernel.StateManagerImpl.assignObjectId(StateManagerImpl.java:51smilie
at org.apache.openjpa.kernel.StateManagerImpl.assignField(StateManagerImpl.java:607)
at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManagerImpl.java:1492)
at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerImpl.java:1475)
at ejb3inaction.example.persistence.Bid.getBidId(Bid.java)
at ejb3inaction.example.buslogic.PlaceBidBean.addBid(PlaceBidBean.java:24)
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:597)
at com.bea.core.repackaged.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.jee.spi.MethodInvocationVisitorImpl.visit(MethodInvocationVisitorImpl.java:37)
at weblogic.ejb.container.injection.EnvironmentInterceptorCallbackImpl.callback(EnvironmentInterceptorCallbackImpl.java:54)
at com.bea.core.repackaged.springframework.jee.spi.EnvironmentInterceptor.invoke(EnvironmentInterceptor.java:50)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
at com.bea.core.repackaged.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
at com.bea.core.repackaged.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at com.bea.core.repackaged.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy126.addBid(Unknown Source)
at ejb3inaction.example.buslogic.PlaceBid_iazuv0_PlaceBidImpl.addBid(PlaceBid_iazuv0_PlaceBidImpl.java:56)
at ejb3inaction.example.buslogic.PlaceBid_iazuv0_PlaceBidImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:11smilie
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: java.lang.Exception: java.sql.SQLException: There is no row for mapping "ejb3inaction.example.persistence.Bid" in sequence table "OPENJPA_SEQUENCE_TABLE", and the attempt to insert a row has apparently failed.
at org.apache.openjpa.util.Exceptions.replaceNestedThrowables(Exceptions.java:249)
at org.apache.openjpa.persistence.PersistenceException.writeObject(PersistenceException.java:100)
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:597)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:945)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1461)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1509)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1474)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1392)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1150)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:326)
at weblogic.rjvm.MsgAbbrevOutputStream.writeObject(MsgAbbrevOutputStream.java:61smilie
at weblogic.rjvm.MsgAbbrevOutputStream.sendThrowable(MsgAbbrevOutputStream.java:471)
at weblogic.rmi.internal.BasicServerRef.handleThrowable(BasicServerRef.java:711)
at weblogic.rmi.internal.BasicServerRef.postInvoke(BasicServerRef.java:650)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:492)
... 3 more
dpanda (136) [Avatar] Offline
#2
Re: Problem running Chapter 2 (Stateless Session Beans) on WebLogic 10.3
Hi,
The WebLogic examples were tested with the ExampleServer in WebLogic 10gR3 with the default PointBase database. Looks like you are using the Oracle database here and hence you may have to make some changes.

Here is the instructions that I had in my blog

http://debupanda.blogspot.com/2008/04/ejb-3-in-action-code-examples-on.html

regards
Debu
WoodrowS (4) [Avatar] Offline
#3
Re: Problem running Chapter 2 (Stateless Session Beans) on WebLogic 10.3
Mr. Panda,

I believe the problem is related to my not having created a JMS connection factory and destination on WebLogic server.

I will update you on my progress.

Thanks,

Woodrow
WoodrowS (4) [Avatar] Offline
#4
Re: Problem running Chapter 2 (Stateless Session Beans) on WebLogic 10.3
Mr. Panda,

I'm having trouble working past the following error:
Buildfile: C:weblogic10_codexamplesuild.xml

CreateResources:
[wlconfig] Unable to create mbean: Could not create provider JDBCConnectionPool

BUILD SUCCESSFUL
Total time: 3 seconds

Woodrow
WoodrowS (4) [Avatar] Offline
#5
Re: Problem running Chapter 2 (Stateless Session Beans) on WebLogic 10.3
Mr. Panda,

I'm able to successfully execute "ant CreateResourceswithDB", but I'm unable to execute "ant CreateResources". Could you please take a look a look at my build script to let me know if you see the reason for this failure? Thanks,
**************************************************************
Output from executing "ant CreateResourceswithDB"
**************************************************************
Buildfile: C:weblogic10_codexamplesuild.xml

CreateResourceswithOracleDB:
[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok


BUILD SUCCESSFUL
Total time: 37 seconds
***********************************************************
Output from executing "ant CreateResources"
Note: Before executing this target, I deleted all of the
JDBC Data Sources created when I executed
"ant CreateResourceswithDB"
***********************************************************
Buildfile: C:weblogic10_codexamplesuild.xml

CreateResources:
[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Ok

[wlconfig] Property not set: ${jdbcstore}

BUILD SUCCESSFUL
Total time: 18 seconds
***********************************************************
Contents of "build.xml"
***********************************************************
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE project [ ><!ENTITY common SYSTEM "file:./common.xml">

]>

<project name="configure-weblogic" default="all" basedir=".">
<import file="common.xml"/>

<!-- Cleanup Resources -->

<target name="CleanUp" >
<wlconfig >
username="${admin.user}"
password="${admin.password}"
url="t3://${admin.host}:${admin.port}"
failonerror="false">

<query domain="wl_server" type="JDBCTxDataSource" name="ActionBazaarDataSource" property="ds" />
<query domain="${domain}" type="JDBCTxDataSource" name="TurtleDataSource" property="ds2" />

<query domain="${domain}" type="JMSServer" name="ABJMSServer" property="jmsserver" />

<query domain="${domain}" type="JDBCConnectionPool" name="ABPool" property="abpool" />
</wlconfig>

<wlconfig >
username="${admin.user}"
password="${admin.password}"
url="t3://${admin.host}:${admin.port}"
failonerror="false">


<delete mbean="${ds}"/>


<delete mbean="${ds2}"/>

<delete mbean="{abpool}"/>

<delete mbean="${jmsserver}"/>

</wlconfig>
</target>

<!-- Create Resources -->
<target name="CreateResourceswithOracleDB">
<wlconfig >
username="${admin.user}"
password="${admin.password}"
url="t3://${admin.host}:${admin.port}"
failonerror="false">

<query domain="dev_adf_domain1" type="Server" name="ManagedServer_ADF_Dev" >
property="managedServer_adf_dev"/>

<!-- Create DataSource -->
<create type="JDBCConnectionPool" name="ABPool" property="abpool">
<set attribute="CapacityIncrement" value="1"/>
<set attribute="DriverName" value="oracle.jdbc.xa.client.OracleXADataSource"/>
<set attribute="InitialCapacity" value="1"/>
<set attribute="MaxCapacity" value="10"/>
<set attribute="Password" value="<pwd>"/>
<set attribute="Properties" value="user=system"/>
<set attribute="RefreshMinutes" value="0"/>
<set attribute="URL" value="jdbc:oracle:thin:@L155176.intranet.calema.ca.gov:1521:orcl2"/>
<set attribute="Targets" value="${managedServer_adf_dev}"/>
</create>

<create type="JDBCTxDataSource" name="ActionBazaarDataSource">
<set attribute="JNDIName" value="ActionBazaarDS"/>
<set attribute="PoolName" value="ABPool"/>
<set attribute="Targets" value="${managedServer_adf_dev}"/>
</create>

<create type="JDBCTxDataSource" name="TurtleDataSource">
<set attribute="JNDIName" value="jdbc/TurtleDS"/>
<set attribute="PoolName" value="ABPool"/>
<set attribute="Targets" value="${managedServer_adf_dev}"/>
</create>
</wlconfig>
</target>

<!-- Create Resources -->
<target name="CreateResources" >
<wlconfig >
username="${admin.user}"
password="${admin.password}"
url="t3://${admin.host}:${admin.port}"
failonerror="false">

<query domain="dev_adf_domain1" type="Server" name="ManagedServer_ADF_Dev" >
property="managedServer_adf_dev"/>

<!-- Create DataSource -->

<create type="JDBCConnectionPool" name="ABPool" property="abpool">
<set attribute="CapacityIncrement" value="1"/>
<set attribute="DriverName" value="oracle.jdbc.xa.client.OracleXADataSource"/>
<set attribute="InitialCapacity" value="1"/>
<set attribute="MaxCapacity" value="10"/>
<set attribute="Password" value="<pwd>"/>
<set attribute="Properties" value="user=system"/>
<set attribute="RefreshMinutes" value="0"/>
<set attribute="ShrinkPeriodMinutes" value="15"/>
<set attribute="ShrinkingEnabled" value="true"/>
<set attribute="TestConnectionsOnRelease" value="false"/>
<set attribute="TestConnectionsOnReserve" value="false"/>
<set attribute="URL" value="jdbc:oracle:thin:@L155176.intranet.calema.ca.gov:1521:orcl2"/>
<set attribute="Targets" value="${managedServer_adf_dev}"/>
</create>

<create type="JDBCTxDataSource" name="ActionBazaarDataSource">
<set attribute="JNDIName" value="ActionBazaarDS"/>
<set attribute="PoolName" value="ABPool"/>
<set attribute="Targets" value="${managedServer_adf_dev}"/>
</create>

<create type="JDBCTxDataSource" name="TurtleDataSource">
<set attribute="JNDIName" value="jdbc/TurtleDS"/>
<set attribute="PoolName" value="ABPool"/>
<set attribute="Targets" value="${managedServer_adf_dev}"/>
</create>

<!-- Create JMS Connection Factory and destination -->

<query domain="dev_adf_domain1" type="JMSJDBCStore" name="ManagedServer_ADF_Dev" property="managedServer_adf_dev" />

<create type="JMSServer" name="ABJMSServer">
<set attribute="Store" value="${jdbcstore}"/>
<set attribute="Targets" value="${managedServer_adf_dev}"/>
<create type="JMSQueue" name="OrderBilling Queue">
<set attribute="JNDIName" value="jms/OrderBillingQueue"/>
</create>
<create type="JMSQueue" name="ShippingRequestQueue">
<set attribute="JNDIName" value="jms/ShippingRequestQueue"/>
</create>
</create>
</wlconfig>
</target>

</project>
**********************************************************************************
Thanks for your help.

Woodrow
dpanda (136) [Avatar] Offline
#6
Re: Problem running Chapter 2 (Stateless Session Beans) on WebLogic 10.3
Hi Widrow,
The primary reason you are getting jdbcstore not set because you have not defined a property named jdbcstore instead you have the following:

<query domain="dev_adf_domain1" type="JMSJDBCStore" name="ManagedServer_ADF_Dev" property="managedServer_adf_dev" />

So you replace jdbcstore with managedServer_adf_dev and the script should work


-Debu