CMP beans in OC4J 9.0.4.
Hi all,
I 've download the oracle sample demo "CMP Entity bean" and deploy it under OC4J 9.0.4.
While running the client i get the following exception in OC4J :
java.lang.NullPointerException
at com.evermind.server.ejb.RemoteDBEntityEJBObject.getPrimaryKey_X(RemoteDBEntityEJBObject.java:39)
at com.evermind.server.ejb.EJBRemoteInvocationHandlerFactory.getObjectInfo(EJBRemoteInvocationHandlerFactory.java:76)
at com.evermind.server.rmi.RMIOutputStream.replaceObject(RMIOutputStream.java:82)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:323)
at com.evermind.server.rmi.RMIOutputStream.writeType(RMIOutputStream.java:166)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:167)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186)
at java.lang.Thread.run(Thread.java:484)
It seems to occurs when OC4J is trying to update an already created rows.
Thanks a lot for any piece of advice.
R�my.
Marcel -- the known-issues document for the 904 release describes how to workaround this issue.
http://otn.oracle.com/tech/java/oc4j/904/release_notes/release-notes-904-preview.html
Custom User Managers Deployed within EJB-JAR Files can not be found.
OC4J is not able to load customer user managers when they are packaged within an EJB-JAR file.
The workaround is to add an explicit <library> element to the orion-application.xml file for the application which points at the EJB-JAR file containing the custom user manager classes. This will allow the custom user manager to be resolved and instantiated.
<orion-application ....>
<library path="d:\oc4j904\j2ee\home\applications\XmlnewsEar\XmlnewsEjb.jar"/>
</orion-application>
cheers
-steve-
Similar Messages
-
hi all;
i have a uml diagram with two classes (matser-detail). i generated the corresponding tables into oracle 9i database from rational rose.
using jdeveloper. when create cmp beans from this two tables, i deploy it works fine
but when i add my finder method (findByID) in ejbql i wrote:
select object(e) from employees e where e.employee_id=?1
i try to deploy again and i have the following error:
javax.ejb.EJBException: nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1525)
at com.sun.ejb.sqlgen.SQLGenerator.generateCreateTableQuery(SQLGenerator.java:530)
at com.sun.ejb.sqlgen.SQLGenerator.<init>(SQLGenerator.java:240)
at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:360)
at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:309)
at com.evermind.server.ejb.deployment.EJBPackage.translateEjbqlQeries(EJBPackage.java:2100)
at com.evermind.server.ejb.compilation.Compilation.translateEjbqlQeries(Compilation.java:140)
at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:178)
at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplicationInstallation.java:526)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:484)
javax.ejb.EJBException: nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at com.sun.ejb.sqlgen.SQLGenerator.<init>(SQLGenerator.java:255)
at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:360)
at com.sun.ejb.sqlgen.SQLGenerator.generateSQL(SQLGenerator.java:309)
at com.evermind.server.ejb.deployment.EJBPackage.translateEjbqlQeries(EJBPackage.java:2100)
at com.evermind.server.ejb.compilation.Compilation.translateEjbqlQeries(Compilation.java:140)
at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:178)
at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplicationInstallation.java:526)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:484)
com.evermind.compiler.CompilationException: Error translating EJBQL: javax.ejb.EJBException: nested exception is: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at com.evermind.server.ejb.compilation.Compilation.translateEjbqlQeries(Compilation.java:143)
at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:178)
at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplicationInstallation.java:526)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:119)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803)
at java.lang.Thread.run(Thread.java:484)
nb: when i use the HR schema coming with 9i it works fine.
need helpI presume you are getting the problem on application
deploy? This happens when upon initialization of the application using the built-in OC4J container/app server that is part of JDeveloper. Here is the full messaging:
[Starting OC4J using the following ports: HTTP=8989, RMI=23892, JMS=9228.]
C:\OraHome1\jdk\bin\javaw.exe -ojvm -classpath C:\OraHome1\j2ee\home\oc4j.jar com.evermind.server.OC4JServer -config C:\OraHome1\jdev\system\oc4j-config\server.xml
[waiting for the server to complete its initialization...]
Copying default deployment descriptor from archive at Q:\CBTCOF\COF_APPLICATION\COF_Project\classes/META-INF/orion-ejb-jar.xml to deployment directory C:\OraHome1\jdev\system\oc4j-config\application-deployments\current-workspace-app\classes...
Auto-deploying file:/Q:/CBTCOF/COF_APPLICATION/COF_Project/classes/ (No previous deployment found)...
Auto-creating table: create table STREET_TYPE (PK_STYP_ID NUMBER(8), STREET_TYPE VARCHAR2(20), primary key (PK_STYP_ID, STREET_TYPE))
Warning: Error creating table: ORA-00955: name is already used by an existing object
[...OTHER SIMILAR ERROR MESSAGES]
done.
Oracle9iAS (9.0.2.0.0) Containers for J2EE initialized
If so, in the application.xml file of you
OC4J instance the is a setting autocreate-tables,
which by default is true!
Set it to false as below and that should clear up
your problem.
<orion-application autocreate-tables="false"
default-data-Hmm. I found at least a dozen or so files with that name and set everyone that had this attriute to "false", restarted the OC4J server and still got these errors. -
CMP Bean's Field Mapping with oracle unicode Datatypes
Hi,
I have CMP which mapps to RDBMS table and table has some Unicode datatype such as NVARCHAR NCAR
now i was woundering how OC4J/ oracle EJB container handles queries with Unicode datatypes.
What i have to do in order to properly develope and deploy CMP bean which has fields mapped onto the data based UNICODE field.?
Regards
atifBased on the sun-cmp-mapping file descriptor
<schema>Rol</schema>
It is expected a file called Rol.schema is packaged with the ejb.jar. Did you perform capture-schema after you created your table? -
Wrong exception being thrown on CMP bean error
In OC4J Release 2 I'm getting the wrong exception thrown from a CMP bean error.
Situation:
Servlet calls an update method on a stateless session bean with trans-attribute of Required. This update method finds 2 entity beans by primary key and updates both of them (all with trans-attribute of Supports). When an error is thrown in the second entity bean (by trying to set a value to something that breaks a constraint), I get the following error:
com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Error preparing bean instance: com.evermind.transaction.MarshallingXAException
at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1164)
at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
Nested exception is:
com.evermind.transaction.MarshallingXAException
at com.evermind.server.ejb.EntityEJBObject.prepare(EntityEJBObject.java:70)
at com.evermind.server.ApplicationServerTransactionSynchronization.prepareComponentsSuccess(ApplicationServerTransactionSynchronization.java:403)
at com.evermind.server.ApplicationServerTransactionSynchronization.beforeCompletion(ApplicationServerTransactionSynchronization.java:565)
at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1063)
at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:552)
at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:834)
at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1160)
at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
Nested exception is:
java.lang.InternalError: Werent current caller, server stacktrace (to disable this message, use -Dejb.assert=false at startup): java.lang.Throwable: Werent current caller
at Test2_EntityBeanWrapper5.setEntityBean(Test2_EntityBeanWrapper5.java:1496)
at com.evermind.server.ejb.EntityEJBHome.passivateAndRelease(EntityEJBHome.java:344)
at com.evermind.server.ejb.EntityEJBObject.releaseContext(EntityEJBObject.java:378)
at Test2_EntityBeanWrapper5.saveState(Test2_EntityBeanWrapper5.java:1442)
at com.evermind.server.ejb.EntityEJBObject.prepare(EntityEJBObject.java:39)
at com.evermind.server.ApplicationServerTransactionSynchronization.prepareComponentsSuccess(ApplicationServerTransactionSynchronization.java:403)
at com.evermind.server.ApplicationServerTransactionSynchronization.beforeCompletion(ApplicationServerTransactionSynchronization.java:565)
at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1063)
at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:552)
at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:834)
at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1160)
at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62) at Test2_EntityBeanWrapper5.setEntityBean(Test2_EntityBeanWrapper5.java:1496)
at com.evermind.server.ejb.EntityEJBHome.passivateAndRelease(EntityEJBHome.java:344)
at com.evermind.server.ejb.EntityEJBObject.releaseContext(EntityEJBObject.java:378)
at Test2_EntityBeanWrapper5.saveState(Test2_EntityBeanWrapper5.java:1442)
at com.evermind.server.ejb.EntityEJBObject.prepare(EntityEJBObject.java:39)
at com.evermind.server.ApplicationServerTransactionSynchronization.prepareComponentsSuccess(ApplicationServerTransactionSynchronization.java:403)
at com.evermind.server.ApplicationServerTransactionSynchronization.beforeCompletion(ApplicationServerTransactionSynchronization.java:565)
at com.evermind.server.ApplicationServerTransaction.beforeCompletion(ApplicationServerTransaction.java:1063)
at com.evermind.server.ApplicationServerTransaction.commit(ApplicationServerTransaction.java:552)
at com.evermind.server.ApplicationServerTransaction.end(ApplicationServerTransaction.java:834)
at TestSession_StatefulSessionBeanWrapper3.updatebothtests(TestSession_StatefulSessionBeanWrapper3.java:1160)
at __jspPage1_insertEntityTest_jsp._jspService(__jspPage1_insertEntityTest_jsp.java:224)
at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
at com.evermind.server.http.HttpApplication.serviceJSP(HttpApplication.java:5680)
at com.evermind.server.http.JSPServlet.service(JSPServlet.java:31)
at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:667)
at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:269)
at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:702)
at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:250)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:62)
Why am I getting a MarshallingXAException instead of a SQLException? In the old OC4J, I got a SQLException wrapped in an OrionRemoteException, with the details of what constraint was broken, instead of this.
I've also duplicated this by doing the entity bean updates directly from the servlet wrapped in a UserTransaction.
Jeff.Tell me whether your transaction has been rolled back or not....If it has been rolled back, then those messages, printed on your server console are debug messages...just ignore them...
After this exception, can u able to execute other applications in OC4J?
--Venky -
SQL error during CMP bean deployment
Hi,
the following exception occures when I deploy a CMP bean to a remote OC4J server (it works fine when I use the internal OC4J process of JDeveloper using the same JDBC connection):
Auto-unpacking E:\Apps\OC4J\j2ee\home\applications\statful.ear... done.
Auto-deploying statful (Assembly had been updated)...
SQL error: E/A-Exception: The Network Adapter could not establish the connection
Warning: Error creating table: E/A-Exception: The Network Adapter could not esta
blish the connection
Auto-deploying statful.jar (ejb-jar.xml had been touched since the previous depl
oyment)... SQL error: E/A-Exception: The Network Adapter could not establish the
connection
Warning: Error creating table: E/A-Exception: The Network Adapter could not esta
blish the connection
done.
The JDBC connection string is "jdbc:oracle:thin:@guopingc:1521:localdb", and it works well if I use it in another java client, like DBVisualizer.
Thanks!
CU, ChrisChris,
Thanks for that quick little tip! I've been having the same error and just spent close to two hours looking through newsgroups et al. for help. Naturally, they all suggest that the database isn't started or the connection data is incorrect. I did what you suggested and now I'm back in business!
If any Oracle or Atlassian oc4j folks are reading - I was receiving a "Network adaptor could not establish a connection" message when deploying to oc4j from jdeveloper. (To Oracle 8.1.7 w/ jdeveloper 9.0.2.8.2 and ocj4 that came with that.) HOWEVER #1, "test"ing both my app server connnection and database connection worked perfectly from within jdeveloper. I could even open the DB connection and view the db contents. HOWEVER #2, my deployment worked for a while before I started seeing this error. That is, I first created 4 EJBs and deployedc to the container completely successfully. I made some changes and re-deployed successfully. Then I added 3 more beans and started getting the error! This should be fixed..... -
Compilation errors with CMP EJBs in OC4J
I have created several new EJB's in JDeveloper using the
EJB creation wizard. For most of them I chose the CMP Entity Beans from Tables wizard. Now I have already created some EJB's this way and have used them successfully. But for some reason when I try to start my OC4J, I get the following error messages for all my new EJB's:
Error creating table: java.sql.SQLException: ORA-00955: name is already used by an existing object
Why is this?The out-of-the-box behaviour of OC4J is to try to create tables for CMP beans when they are deployed. It sounds like a redeployment may be occuring bwhen you restart OC4J which is causing it to try and create the tables.
I think that even though you see these error messages, the container will start and your beans will function.
You can do one of two things to alter this situation if you want
a) manually drop the tables from the db before you do the next deployment
b) set the default behaviour of OC4J to drop tables when an application is undeployed (which happens before a redeployment is done) -- this can be done by setting an additional attribute on the j2ee/home/config/application.xml file -- "autodelete-tables=true"
-steve- -
HOW TO GET THE SQLEXCEPTION FROM CMP BEAN
Hi All,
I am using CMP Bean as back end in my application.My client class access the CMP Bean to Create or Update the records via Session Facade.In My Database i am using trigger to avoid the concurrent updation.So when the concurrent calls made the database triigger will throw ERROR ..It works fine....But in EJB all the Exception will be thrown as RemoteException.
But my problem is container will always throws Remote Exception to the client .I need get the actual SQL EXCEPTION (SQL STATE)thrown from the database.I have used the printStackTrace() method to print it in my Console..It work fine..I need to covert this as String ..So that only i can compare the String and can tell the End User what is the Error.....
when i convert this exception as String by Using the following Code -
Client.Java
try {
///I am calling the CMP Bean here via Session Facade
} catch (RemoteException e) {
String actualExc = null;
StringWritter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
e.printStackTrace(pw); //This call prints the exception in console
actualExc = sw.toString();///This string returns only the Stack levels classes ..Not the Exception.(I NEED THE FULL EXCEPTION DETAILS TO THIS STRING )
How to convert this printStackTrace() exception into String ......Please if u need any other details i will give u..Any idea about this..
Please reply me....Thanks for the reply. Is there any other way to get the actual exception thrown from the database level in CMP bean. Because i am getting only the RemoteException in Client. I am Using Whepshere/DB2.
-
Physical table name - abstract table name mapping in CMP Bean
Hello,
I am using a EJB 2.x bean deployed on a SJSAS 9 server. EJB has problem associating the EJB to the actual table
Details are as follows:
EJB name: AccountCMP
Actual tablename : account
Error
ejb store called
IM: postInvokeentity3.AccountBean145996470_ConcreteImpl@d6be89
EJB5071: Some remote or transactional roll back exception occurred
com.sun.jdo.api.persistence.support.JDODataStoreException: JDO76400: Got a JDBC SQLException while executing the SQL statement:
insert into "ACCOUNTCMP"("DESCRIPTION", "ACCOUNTNAME", "BALANCE", "ACCID") values ( ?, ?, ?, ?).
Please examine the SQLException for more information.
NestedException: java.sql.SQLException: ORA-00942: table or view does not exist
FailedObjectArray: [entity3.AccountBean145996470_JDOState@5332ca]
Please note that the insert statement has the ejb-name (I think so, as my CMP EJB is called ACCOUNTCMP) instead of the actual tablename (account).
I do have the account.dbschema file and sun-cmp-mappings.xml in the NB 5.5 project, but the mappings.xml file is not included in the jar by NB. Is that expected, or an problem.
sun-cmp-mappings.xml
<sun-cmp-mappings>
<sun-cmp-mapping>
<schema>account</schema>
<entity-mapping>
<ejb-name>AccountCMP</ejb-name>
<table-name>account</table-name>
<cmp-field-mapping>
ejb-jar.xml
<enterprise-beans>
<entity>
<ejb-name>AccountCMP</ejb-name>
<local-home>entity3.AccountLocalHome</local-home>
<local>entity3.AccountLocal</local>
<ejb-class>entity3.AccountBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>entity3.AccountPK</prim-key-class>
<reentrant>false</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>account</abstract-schema-name> Thank you for your help.Hello,
I found out the issue. sun-cmp-mappings.xml file is mandatory, and dont know why, netbeans excludes this file from the jar. I had to edit project.properties file to negate this exclusion.
Another problem was that my table did not have a primary key (and hence by schema file did not have it also). CMP bean code generator did not like this.
Once I fixed these two problems, my CMP started working fine.
Thank you all -
Error in Deploying CMP Bean!!!
i'm writing a CMP Bean. i wrote the Bean , home and remote interfaces. i'm using weblogic 7.0 as my application server.
1. what is the default data base for the weblogic 7.0.
2. should v create any table while deploying the CMP bean in a database. i think there is no need because the container will take care of it.
3. what is the need of <Data-source-name> in the deployment descriptor file weblogic-cmp-ejb-jar.xml. this is a mandatory field. can i give a random name here? if not, how 2 create a data source name.
please refer my deployment descriptor file.s
<!DOCTYPE weblogic-rdbms-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB RDBMS Persistence//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-rdbms20-persistence-700.dtd'>
<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<ejb-name>Product</ejb-name>
<data-source-name>examples-dataSource-demoPool</data-source-name>
<table-map>
<table-name>TORDER</table-name>
<field-map>
<cmp-field>productID</cmp-field>
<dbms-column>PRODUCTID</dbms-column>
</field-map>
<field-map>
<cmp-field>name</cmp-field>
<dbms-column>NAME</dbms-column>
</field-map>
<field-map>
<cmp-field>description</cmp-field>
<dbms-column>DESCRIPTION</dbms-column>
</field-map>
<field-map>
<cmp-field>basePrice</cmp-field>
<dbms-column>BASEPRICE</dbms-column>
</field-map>
</table-map>
</weblogic-rdbms-bean>
<create-default-dbms-tables>True</create-default-dbms-tables>
</weblogic-rdbms-jar>
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Product</ejb-name>
<home>examples.ProductHome</home>
<remote>examples.Product</remote>
<ejb-class>examples.ProductBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>ProductBean</abstract-schema-name>
<cmp-field>
<field-name>productID</field-name>
</cmp-field>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<cmp-field>
<field-name>description</field-name>
</cmp-field>
<cmp-field>
<field-name>basePrice</field-name>
</cmp-field>
<primkey-field>productID</primkey-field>
<query>
<query-method>
<method-name>findByName</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.name = ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByDescription</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.description = ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findByBasePrice</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.basePrice = ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findExpensiveProducts</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.basePrice > ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findCheapProducts</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.basePrice < ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findAllProducts</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(p) FROM ProductBean AS p WHERE p.productID IS NOT NULL]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Product</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN" "http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>Product</ejb-name>
<entity-descriptor>
<entity-cache>
<max-beans-in-cache>1000</max-beans-in-cache>
</entity-cache>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<jndi-name>RemoteProductHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
4. when i tried to deploy the following error occurs.. how to fix the errror.
weblogic.management.ApplicationException: activate failed forrgcmp1
Module Name: rgcmp1, Error: Exception activating module: EJBModule(rgcmp1,status=PREPARED)
Unable to deploy EJB: Product from rgcmp1.jar:
The DataSource with the JNDI name: examples-dataSource-demoPool could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
TargetException:
Unable to deploy EJB: Product from rgcmp1.jar:
The DataSource with the JNDI name: examples-dataSource-demoPool could not be located. Please ensure that the DataSource has been deployed successfully and that the JNDI name in your EJB Deployment descriptor is correct.
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1097)
at weblogic.j2ee.J2EEApplicationContainer.activate(J2EEApplicationContainer.java:1078)
at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:1144)
at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:764)
at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)i tried to configure my data source and the following error occured.
After opening the Admin console, in 'connection pool' i created a demo pool and deployed it.(i refered the samples (Weblogic) for doing this ...even to tell more precisely i did a copy/paste).
Name : demopool
URL : jdbc:pointbase:server://localhost/demo
Driver Classname : com.pointbase.xa.xaDataSource
Properties (key=value); ser=examples DatabaseName=jdbc:pointbase:server://localhost/demo
password: weblogic
open sting password: weblogic
then i tried to create the data source..
Name: examples-dataSource-demoPool
jndi name: rgexample
pool name: demopool
Row Prefetch Size : 48
Stream Chunk Size : 256
then the following error occured while deployment.
java.lang.reflect.InvocationTargetException: weblogic.management.DistributedManagementException: Distributed Management [1 exceptions]
Error creating data source
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:653)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
at $Proxy18.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
at $Proxy14.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
Distributed update exception
- remote object: RaghuDomain:Location=egserver,Name=egserver,Type=ServerConfig
- remote server: weblogic.management.internal.RemoteMBeanServerImpl@673498
- actionName: addDeployment
- params: [Ljava.lang.Object;@19f294
- signature: [Ljava.lang.String;@4f787
Distributed update exception
- remote object: RaghuDomain:Location=egserver,Name=egserver,Type=ServerConfig
- remote server: weblogic.management.internal.RemoteMBeanServerImpl@673498
java.lang.Exception: weblogic.common.ResourceException: DataSource(rgexample) can't be created with non-existent Pool (connection or multi) (demopool)
at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:126)
at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:262)
at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
at $Proxy18.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
at $Proxy14.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:286)
at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
at $Proxy18.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
at $Proxy14.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
--------------- nested within: ------------------
weblogic.management.DeploymentException: Error creating data source - with nested exception:
[java.lang.Exception: weblogic.common.ResourceException: DataSource(rgexample) can't be created with non-existent Pool (connection or multi) (demopool)
at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:126)
at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:262)
at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
at $Proxy18.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
at $Proxy14.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:295)
at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
at $Proxy18.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
at $Proxy14.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
--------------- nested within: ------------------
weblogic.management.DistributedOperationUpdateException: Error creating data source - with nested exception:
[weblogic.management.DeploymentException: Error creating data source - with nested exception:
[java.lang.Exception: weblogic.common.ResourceException: DataSource(rgexample) can't be created with non-existent Pool (connection or multi) (demopool)
at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:126)
at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:262)
at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:154)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:750)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:732)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:435)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:596)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
at $Proxy18.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
at $Proxy14.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:234)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:210)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:607)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:437)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerImpl.java:928)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:472)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:200)
at $Proxy18.addDeployment(Unknown Source)
at weblogic.management.internal.DynamicMBeanImpl.unprotectedUpdateDeployments(DynamicMBeanImpl.java:1802)
at weblogic.management.internal.DynamicMBeanImpl.access$2(DynamicMBeanImpl.java:1755)
at weblogic.management.internal.DynamicMBeanImpl$2.run(DynamicMBeanImpl.java:1733)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1729)
at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:1053)
at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:371)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1358)
at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1333)
at weblogic.management.internal.RemoteMBeanServerImpl.setAttribute(RemoteMBeanServerImpl.java:874)
at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:326)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:195)
at $Proxy14.setTargets(Unknown Source)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:145)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.se--------------- nested within: ------------------
weblogic.management.console.utils.SetException: An error occurred while updating Targets-Server on Proxy for RaghuDomain:Name=examples-dataSource-demoPool,Type=JDBCDataSource - with nested exception:
[java.lang.reflect.InvocationTargetException - with target exception:
[weblogic.management.DistributedManagementException: Distributed Management [1 exceptions]
Error creating data source]]
at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:181)
at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1075)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:418)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:306)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:5517)
at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:685)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3156)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2506)
at weblogic.kernel.Exe -
Error while deploying CMP Bean
hi all,
i'm very new in J2EE Technology .I was trying one of the sample application available in sun one examples and sample applicationsm site.
I have registered a datasource called hari
in my server instance
when im deploying the J2EE Application which contains a CMP Bean, when i deploy in the final stage i'm getting an error
"javax.naming.InvalidNameException:
error loading c:\j2sdkee1.3.1\repository\c3018a\applications\CMPApp1046345051707Server.jar;nested exception is:
javax.naming.InvalidNameException:
Real JNDI name cannot be empty for hari
can anyone help me to fix this problem ,where exactly i have to mention the real name for this DataSourceSounds like there is a resource-ref in your application that
has not been mapped to a physical datasource in the
sun-j2ee-ri.xml file.
e.g. :
<resource-ref>
<res-ref-name>jdbc/AccountDB</res-ref-name>
<jndi-name>jdbc/XACloudscape</jndi-name>
<default-resource-principal>
<name>scott</name>
<password>tiger</password>
</default-resource-principal>
</resource-ref>
See the J2EE Tutorial for additional examples.
--ken -
Mapping a CMP bean to more than one table
Hello,
I like to map a CMP bean to more than one table. I am using wlserver7.0 SP2. I
have a VendorBean with a CMP field "comments" mapped to VENDOR_COMMENTS table.
All other CMP fields in VendorBean are mapped to VENDOR table. Below is the snippet
of weblogic-cmp-rdbms-jar.xml:
<weblogic-rdbms-bean>
<ejb-name>VendorBean</ejb-name>
<data-source-name>sweepDataSource</data-source-name>
<table-map>
<table-name>VENDOR</table-name>
<field-map>
<cmp-field>expIndicator</cmp-field>
<dbms-column>VENDOR_EXP_IND</dbms-column>
</field-map>
<field-map>
<cmp-field>vendorId</cmp-field>
<dbms-column>VENDOR_SEQ_KEY</dbms-column>
</field-map>
</table-map>
<table-map>
<table-name>VENDOR_COMMENTS</table-name>
<field-map>
<cmp-field>vendorId</cmp-field>
<dbms-column>VENDOR_SEQ_KEY</dbms-column>
</field-map>
<field-map>
<cmp-field>comments</cmp-field>
<dbms-column>VENDOR_COMMENT</dbms-column>
</field-map>
</table-map>
As you can see, "vendorId" is the primary key cmp field mapped to VENDOR_SEQ_KEY
column in both tables. The relationship between the table rows are 1 to 1. When
I run ejbc, I get the exception below:
[ejbc] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[ Asserti
on violated ]
[ejbc] at weblogic.utils.Debug.assertion(Debug.java:74)
[ejbc] at weblogic.ejb20.cmp.rdbms.RDBMSBean.processRole(RDBMSBean.java
:1389)
[ejbc] at weblogic.ejb20.cmp.rdbms.RDBMSBean.processDescriptors(RDBMSBe
an.java:1105)
[ejbc] at weblogic.ejb20.cmp.rdbms.Deployer.readTypeSpecificData(Deploy
er.java:299)
[ejbc] at weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFil
e(PersistenceType.java:490)
[ejbc] at weblogic.ejb20.persistence.PersistenceType.setupDeployer(Pers
istenceType.java:407)
[ejbc] at weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:11
4)
[ejbc] at weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSourc
es(EJB20CMPCompiler.java:64)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:22
3)
[ejbc] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
44)
[ejbc] at weblogic.ejbc20.runBody(ejbc20.java:470)
[ejbc] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[ejbc] at weblogic.ejbc20.main(ejbc20.java:711)
But if I put the "comments" <field-map> inside the VENDOR <table-map> and get
rid off the <table-map> for VENDOR_COMMENTS, I was able to run ejbc. Of course,
I get the run time exception during deployment because, there is no column called
"VENDOR_COMMENT" in VENDOR table. Please help me. Thanks a million.Wrong newsgroup, needs to go to one of the ejb newsgroups.
mbg
"Sai S Prasad" <[email protected]> wrote in message
news:[email protected]...
>
Hello,
I like to map a CMP bean to more than one table. I am using wlserver7.0SP2. I
have a VendorBean with a CMP field "comments" mapped to VENDOR_COMMENTStable.
All other CMP fields in VendorBean are mapped to VENDOR table. Below isthe snippet
of weblogic-cmp-rdbms-jar.xml:
<weblogic-rdbms-bean>
<ejb-name>VendorBean</ejb-name>
<data-source-name>sweepDataSource</data-source-name>
<table-map>
<table-name>VENDOR</table-name>
<field-map>
<cmp-field>expIndicator</cmp-field>
<dbms-column>VENDOR_EXP_IND</dbms-column>
</field-map>
<field-map>
<cmp-field>vendorId</cmp-field>
<dbms-column>VENDOR_SEQ_KEY</dbms-column>
</field-map>
</table-map>
<table-map>
<table-name>VENDOR_COMMENTS</table-name>
<field-map>
<cmp-field>vendorId</cmp-field>
<dbms-column>VENDOR_SEQ_KEY</dbms-column>
</field-map>
<field-map>
<cmp-field>comments</cmp-field>
<dbms-column>VENDOR_COMMENT</dbms-column>
</field-map>
</table-map>
As you can see, "vendorId" is the primary key cmp field mapped toVENDOR_SEQ_KEY
column in both tables. The relationship between the table rows are 1 to 1.When
I run ejbc, I get the exception below:
[ejbc] weblogic.utils.AssertionError: ***** ASSERTION FAILED *****[Asserti
on violated ]
[ejbc] at weblogic.utils.Debug.assertion(Debug.java:74)
[ejbc] atweblogic.ejb20.cmp.rdbms.RDBMSBean.processRole(RDBMSBean.java
:1389)
[ejbc] atweblogic.ejb20.cmp.rdbms.RDBMSBean.processDescriptors(RDBMSBe
an.java:1105)
[ejbc] atweblogic.ejb20.cmp.rdbms.Deployer.readTypeSpecificData(Deploy
er.java:299)
[ejbc] atweblogic.ejb20.persistence.PersistenceType.setTypeSpecificFil
e(PersistenceType.java:490)
[ejbc] atweblogic.ejb20.persistence.PersistenceType.setupDeployer(Pers
istenceType.java:407)
[ejbc] atweblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:11
4)
[ejbc] atweblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSourc
es(EJB20CMPCompiler.java:64)
[ejbc] atweblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:22
3)
[ejbc] atweblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:3
44)
[ejbc] at weblogic.ejbc20.runBody(ejbc20.java:470)
[ejbc] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[ejbc] at weblogic.ejbc20.main(ejbc20.java:711)
But if I put the "comments" <field-map> inside the VENDOR <table-map> andget
rid off the <table-map> for VENDOR_COMMENTS, I was able to run ejbc. Ofcourse,
I get the run time exception during deployment because, there is no columncalled
"VENDOR_COMMENT" in VENDOR table. Please help me. Thanks a million. -
Hi guys
We are having a problem with the migration to WLCS 3.2 SP2 / WLS 5.1 SP10.
We are moving from WLCS 3.2 and WLS SP6. Our CMP beans generate errors when
the container tries to update them. They deploy without error though.
See below for the stack trace
We use the recommended weblogic driver for our Oracle 8.1.7.0 database. WL
runs on w2k, and Oracle on Solaris 7.
Extract from set-environment:
SET DB_CLASSPATH=
SET PATH=%PATH%;%WEBLOGIC_HOME%\bin\oci815_8;%WLCS_ORACLE_HOME%\bin
SET
SQLPATH=C:\WebLogicCommerceServer3.2\db\oracle816;C:\WebLogicCommerceServer3
.2\db\oracle816\event;
Extract from weblogic.properties:
weblogic.jdbc.connectionPool.commercePool=\
url=jdbc:weblogic:oracle,\
driver=weblogic.jdbc.oci.Driver,\
I made a few experiments, and I noticed that generating the CMP classes
(with EJBC) with the old WebLogic_RDBMS.jar (from WLS SP6) is working fine.
Here is what I mean : ejbc uses the library
c:\weblogic\lib\persistence\WebLogic_RDBMS.jar And this library has changed
with SP10. However since that change and after rebuilding our jars, all CMP
entity beans fail to update.
If I just replace that WebLogic_RDBMS.jar with the previous one (from SP6),
and without changing anything else, our CMP beans work fine. I did not
change any driver or xml deployment descriptor.
One of the generated files in the jar (for our bean
VisibilityPSWebLogic_CMP_RDBMS.class) differs, and that seems to be the
cause of the problem.
I jadded that class and here is a difference I notice:
OLD, ejbc ran with SP6 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId =
(BigDecimal)resultset.getObject(5);
NEW, ejbc ran with SP10 WebLogic_RDBMS.jar : visibilitybean.targetCompanyId
= resultset.getBigDecimal(5, 35);
Similar differences for the SETbigdecimal.
Dunno if that will help, but I'm attaching the 2 jar files with explicit
names.
Damn that was long, I hope someone will read it... Thanks for any help on
this, see stack trace attached below
Nicolas Lejeune
Stack trace:
mer. oct. 03 12:16:22 CEST 2001:<I> <EJB JAR deployment
C:/WebLogicCommerceServer3.2/lib/foundation.jar> Exception in
non-transactional EJB invoke:
java.rmi.UnexpectedException: Unexpected exception in
com.b2boost.visibility.VisibilityBean.getVisibilityId():
java.sql.SQLException: ORA-01722: invalid number
at weblogic.db.oci.OciCursor.getCDAException(OciCursor.java:230)
at weblogic.jdbcbase.oci.Statement.executeUpdate(Statement.java:980)
at
weblogic.jdbc20.pool.PreparedStatement.executeUpdate(PreparedStatement.java:
47)
at
com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.update(VisibilityPSWeb
Logic_CMP_RDBMS.java:446)
at
com.b2boost.visibility.VisibilityPSWebLogic_CMP_RDBMS.store(VisibilityPSWebL
ogic_CMP_RDBMS.java:376)
at
weblogic.ejb.internal.EntityEJBContext.store(EntityEJBContext.java:192)
at
weblogic.ejb.internal.EntityEJBContext.beforeCompletion(EntityEJBContext.jav
a:227)
at
weblogic.ejb.internal.StatefulEJBObject.postInvokeNoTx(StatefulEJBObject.jav
a:355)
at
weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:865)
at
com.b2boost.visibility.VisibilityBeanEOImpl.getVisibilityId(VisibilityBeanEO
Impl.java:198)
at
com.b2boost.visibility.pipeline.LoadFirstVisibilityRequestPC.process(LoadFir
stVisibilityRequestPC.java:83)
at
com.beasys.commerce.foundation.pipeline.PipelineExecutorImpl.process(Pipelin
eExecutorImpl.java:193)
at
com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl.process(P
ipelineExecutorImplEOImpl.java:56)
at
com.beasys.commerce.foundation.pipeline.PipelineExecutorImplEOImpl_ServiceSt
ub.process(PipelineExecutorImplEOImpl_ServiceStub.java:154)
at
com.beasys.commerce.webflow.PipelineProcessor.callPipeline(PipelineProcessor
.java:170)
at
com.beasys.commerce.webflow.PipelineProcessor.process(PipelineProcessor.java
:102)
at
com.beasys.commerce.webflow.WebflowAdvisor.handleTarget(WebflowAdvisor.java:
409)
at
com.beasys.commerce.webflow.WebflowAdvisor.processTarget(WebflowAdvisor.java
:156)
at
com.b2boost.framework.B2boostPortalDestinationDeterminer.determineDestinatio
n(B2boostPortalDestinationDeterminer.java:208)
at
com.beasys.commerce.foundation.flow.FlowManager.service(FlowManager.java:438
at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:120)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:922)
at
weblogic.servlet.internal.ServletContextImpl.invokeServlet(ServletContextImp
l.java:886)
at
weblogic.servlet.internal.ServletContextManager.invokeServlet(ServletContext
Manager.java:269)
at
weblogic.socket.MuxableSocketHTTP.invokeServlet(MuxableSocketHTTP.java:392)
at
weblogic.socket.MuxableSocketHTTP.execute(MuxableSocketHTTP.java:274)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
[Visibility_generated_with_SP6_weblogic_rdbms_jar.jar]
[Visibility_generated_with_SP10_weblogic_rdbms_jar.jar]You are using WebLogic jDriver for Oracle which needs exact version of OCI API, that comes with the Oracle client installation. Ensure that you have installed the right Oracle client version. And updated the PATH properly.
I notice that you have
bin/oci815_8
oracle816
Thsi looks liek the inconsistency in your environment.
What you need to do is
1. find oci817_8 and place that in the PATH.
2. install oracle 817 and use that client and set the ORACLE_HOME environment variable and the PATH properly.
Try this and see if it helps.
BTW - WLS 5.1 is EOL -
Resource Ref's settings of a CMP bean in SAS PE 8.2 - Deploytool
Dear all,
In the deploytool of SAS8.2, in the [Resource Ref's] tab of a CMP bean do I need to set anything here to enable the CMP bean to connect to the database?
I already have a JDBC source registered in the server and it is called jdbc/mydatasource.
Thanks in advance.Problem solved. For CMP beans, I just need to set the JNDI name of the CMP resource and this name corresponds to the JNDI name of the the JDBC resource registered in the SAS.
But for BMP beans, I will have to add an entry in the [Resource Ref's] tab. The [Coded name] corresponds to the JNDI name used in the code to look up this JDBC resource.
Thanks all. -
Exception - Deploying CMP bean with Postgres DB
Hi,
When I deploy a CMP bean in Weblogic6.1 configured with Postgres Database it throws the following exception.
<Oct 22, 2002 5:55:10 PM IST> <Error> <J2EE> <Error deploying application EjbTes
t:
Unable to deploy EJB: EjbTest.jar from EjbTest.jar:
Exception: 'java.lang.NullPointerException' while trying to invoke: setB
eanParamsForCreate at line 25
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:302)
at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:296)
at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:684)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:851)
<Oct 22, 2002 5:55:10 PM IST> <Error> <Management> <Error deploying application
.\config\siptech\applications\EjbTest.jar: java.lang.reflect.UndeclaredThrowable
Exception>
Thankx,
JaganHi. This isn't a jdbc question, so you'll have better luck posting this to the ejb group.
Joe
Jagan wrote:
Hi,
When I deploy a CMP bean in Weblogic6.1 configured with Postgres Database it throws the following exception.
<Oct 22, 2002 5:55:10 PM IST> <Error> <J2EE> <Error deploying application EjbTes
t:
Unable to deploy EJB: EjbTest.jar from EjbTest.jar:
Exception: 'java.lang.NullPointerException' while trying to invoke: setB
eanParamsForCreate at line 25
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:302)
at weblogic.ejb20.deployer.Deployer.runEJBC(Deployer.java:296)
at weblogic.ejb20.deployer.Deployer.compileEJB(Deployer.java:684)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:851)
<Oct 22, 2002 5:55:10 PM IST> <Error> <Management> <Error deploying application
.\config\siptech\applications\EjbTest.jar: java.lang.reflect.UndeclaredThrowable
Exception>
Thankx,
Jagan -
CMP beans, VCafe IDE and " finder-expression "
I am building CMP beans, and am trying to make some finder methods.
VCafe allows you to make the string for the "<finder-query>" element in
the weblogic-cmp-rdbms-jar.xml, but I can't find UI to also add a
"<finder-expression>" element to the finder-query. Am I just missing it
somewhere, or why the omission?Using this will allow me to make the <finder-query> attrubute, but NOT any
<finder-expression> attributes.....Or am I missing something? I am trying to
have my finder pass in a PK object, but then use the public primative members
of the PK object to compare to what is in the database. If I say
findbyForeignKey(ForeignPK) and the database has a foreign_id column that
contains a long, and the ForeignPK has a long as it's id, I can't use (= $0
foreign_id). I get an error. The EJB Deployer tool allows you to add
expressions like <number> 0, <expression> @0.id, <type> long, all along with
the finder query. Does anyone know how to add the expression part of the
query, not just the WLQL query itself, in VCafe?
Nirav Chanchani wrote:
Michael,
I assume you are using WebGain Studio 4.0. The sequence is
Project->Configure Deployment Descriptor->Target Options Tab->Finders Tab.
Nirav.
Michael SMith wrote:
I am building CMP beans, and am trying to make some finder methods.
VCafe allows you to make the string for the "<finder-query>" element in
the weblogic-cmp-rdbms-jar.xml, but I can't find UI to also add a
"<finder-expression>" element to the finder-query. Am I just missing it
somewhere, or why the omission?--
Nirav Chanchani
BEA Systems, Inc.
Maybe you are looking for
-
Hello. I have a Business edition 5000 running on a MCS 7828H3. Its versions are CUCM System version: 6.1.3.1000-16 , and CUC Version 2.1.3ES23.1000-23. Am I to follow the upgrade docs for full CUCM/CUC? Also, i know there are requirements when usi
-
Hi, How can we see the print preview after completion of F110 without going to Spool Request. Our Technical consultant want to see the print preview, our spool requests are taking lot of time and those requests are appearing after one or two days onl
-
Centering my page in any size resolution
I am new to web design, in fact didn't really want to be a web page designer, but one of my partners over promised my skill set to a client so now I am stuck. I have designed the page, but am having a lot of trouble getting it to center in when I op
-
BC Photo Gallery - Center Thumbnail Image
How to edit BC Photo Gallery Module so thumbnail image is centered Example a square photo next to a tall rectangle image The tall image is align left - how to make it so image is centered in thumbnail area? Message was edited by: WillzShireDDC
-
DMS Vault - check in a new version
Hello. I created a vault for the DMS. It correctly places the files onto the server, and they are accessible. However, it not longer's allows for versioning. The 'check in as a new version' is grayed out. Any ideas why? Thanks, Graeme.