Error Deploying CMP Entity Bean
Hi,
I am new to Entity Beans and am trying to deploy a CMP Entity Bean without any success.
I did search this forum for similar issues and tried those suggestions as well but that has not helped. Was wondering if someone could help me out on this.
The Entity bean has 2 fields: name and description.
The ejb-jar.xml file for this bean is:
<enterprise-beans>
<entity>
<ejb-name>Product</ejb-name>
<home>example.cmp.ProductHome</home>
<remote>example.cmp.Product</remote>
<ejb-class>example.cmp.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>PRODUCTS</abstract-schema-name>
<cmp-field>
<field-name>name</field-name>
</cmp-field>
<cmp-field>
<field-name>description</field-name>
</cmp-field>
<primkey-field>name</primkey-field>
<query>
</query>
</entity>
</enterprise-beans>
The error that I get while deploying the bean is:
Error deploying EJB homes for: file:/C:/servers/oc4j1013/j2ee/home/applications/cmptest/cmptest.jar
java.lang.InstantiationException: Error looking up cmt-datasource at jdbc/OracleDS (name not found)
at com.evermind.server.ApplicationState.getDataSourceContainer(ApplicationState.java:384)
Error deploying file:/C:/servers/oc4j1013/j2ee/home/applications/cmptest/cmptest.jar
homes: Error looking up cmt-datasource at jdbc/OracleDS (name not found)
[java] [TopLink Severe]: 2005.04.17 10:22:20.156--ServerSession(28816172)--
Local Exception Stack:
[java] Exception [TOPLINK-7060] (TopLink (Oracle OC4J CMP) - 10g release 3(10.1.3.0) (Build 041129)): oracle.toplink.exceptions.ValidationException
[java] Exception Description: Cannot acquire data source [jdbc/OracleDS].
[java] Internal Exception: javax.naming.NameNotFoundException: jdbc/OracleDS not found
[java] at oracle.toplink.exceptions.ValidationException.cannotAcquireDataSource(ValidationException.java:208)
[java] at oracle.toplink.internal.ejb.cmp.oc4j.Oc4jNonJtaConnector.getOrCreateDataSource(Oc4jNonJtaConnector.java:62)
If anybody knows what the problem is please let me know.
Thanks in advance.
Bhupen
Please note that the data-source has been re-architectured in 10.1.3 DP3 and you should have DataSource as follows:
<data-sources xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd' schema-major-version='10' schema-minor-version='1'>
<managed-data-source connection-pool-name='Example Connection Pool' jndi-name='jdbc/OracleDS' name='OracleManagedDS' />
<connection-pool name='Example Connection Pool' >
<connection-factory factory-class='oracle.jdbc.pool.OracleDataSource' user='scott' password='tiger' url='jdbc:oracle:thin:@localhost:1521:orcl'>
</connection-factory>
</connection-pool>
</data-sources>
Similar Messages
-
Bad Performance/OutOfMemory Error in CMP Entity Bean with Large DB
Hello:
I have an CMP Entity deployed on WLS 7.0
The entity bean maps to a table that has 97,480 records.
It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
I have a JSP client that invokes the findALL()
The performance is very poor ~ 150 seconds just to perform the findAll() - (Benchmark
from within the JSP code)
If more than one simultaneous call is made then I get outOfMemory Error.
WLS is started with max memory of 512MB
EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
(without max-beans-in-cache directive the performance is worse)
Is there any documentation available to help us in deploying CMP Entity Beans
with very large number of records (instances) ?
Any help is greatly appreciated.
Regards
RajanHi
You should use a Select Method, it does support cursors.
Or a Home Select Method combination.
Regards
Thomas
WLS is started with max memory of 512MB
EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>>
(without max-beans-in-cache directive the performance is worse)>
Is there any documentation available to help us in deploying CMP
Entity Beans with very large number of records (instances) ? Any help
is greatly appreciated.>
Regards>
Rajan>
>
"Rajan Jena" <[email protected]> schrieb im Newsbeitrag
news:3dadd7d1$[email protected]..
>
Hello:
I have an CMP Entity deployed on WLS 7.0
The entity bean maps to a table that has 97,480 records.
It has a finder: findAll() -- SELECT OBJECT(e) FROM Equipment e
I have a JSP client that invokes the findALL()
The performance is very poor ~ 150 seconds just to perform the findAll() -(Benchmark
from within the JSP code)
If more than one simultaneous call is made then I get outOfMemory Error.
WLS is started with max memory of 512MB
EJB is deployed with <max-beans-in-cache>100000</max-beans-in-cache>
(without max-beans-in-cache directive the performance is worse)
Is there any documentation available to help us in deploying CMP EntityBeans
with very large number of records (instances) ?
Any help is greatly appreciated.
Regards
Rajan -
Deploying CMP Entity Beans in Weblogic
How to generate/convert the Orion xml file to Weblogic_RDBMS ?
Thxpetstore 1.3 will be available for the upcoming beta of weblogic 7.0...
Andrew Sliwkowski(BEA)
[email protected]
"Nitin Sawant" <[email protected]> wrote in message
news:3c04f6cd$[email protected]..
>
Appreciate if you can share your plans on releasing a petstore 1.3 patchfor weblogic.
>
>
i am having problems deploying CMP Entity Beans in petstore 1.3 where theprimary
key class is defined as java.lang.Object in the ejb-jar.xml descriptor(<prim-key-class>java.lang.Object</prim-key-class>).
Does weblogic 6.1 with 1.3 features enabled support the above feature.
Thanks, -
Error in deploying CMP Entity Beans
Hello,
When I created a CMP Entity Bean using the JDeveloper Release Candidate and try to deploy it I get the following message:
Auto-creating table: create table POGROUP_PRESS_RELEASE (press_release_id integer not null primary key, press_release_date varchar (255) null, title varchar (255) null, time varchar (255) null, release_type varchar (255) null, URL VARCHAR2(100))
Warning: Error creating table: ORA-00955: name is already used by an existing object
What does this mean? Does it mean that this bean cannot be deployed. If the table already exists in the database shouldn't it use the table instead of trying to create the table?
Any help would be appreciated,
Gopiinitialize "table" attribute of <entity-deployment> element to POGROUP_PRESS_RELEASE.This will prevent auto-create functionality of OC4J.
However this <entity-deployment> tag present only in orion-ejb-jar.xml.So you have to create this file and include along with ejb-jar.xml in jar file.
Sample orion-ejb-jar.xml looks like this....
<orion-ejb-jar deployment-version="1.0.2.2" deployment-time="ea013a2eda">
<enterprise-beans>
<entity-deployment name="TestHome" location="TestHome" wrapper="TestHome_EntityHomeWrapper5" table="POGROUP_PRESS_RELEASE" data-source="jdbc/OracleDS">
<primkey-mapping>
<cmp-field-mapping name="m_ID" persistence-name="ID" />
</primkey-mapping>
<resource-ref-mapping name="jdbc/OracleCoreDS" />
</entity-deployment>
</enterprise-beans>
</entity-deployment>
</orion-ejb-jar>
For complete DTD :
http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd
Hope this helps.....
--Venky -
Problem in deploying CMP entity bean 2.0 in J2EE 1.4
i am trying to deploy a cmp entity bean 2.0 using j2ee1.4 deployment tool. the bean uses sql server as the database. i have successfully created a coonection pool for sql server using j2ee admin console. the entity bean class files are successfully compiled. but while deploying the entity bean i am not able to set the database settings and jndi name for the bean. can one please guide me in the deployment steps in j2ee1.4.
mohitMohit,
We are discussing this topic in the fourm below. I'm having the same problem so feel free to join our conversation.
~Howard
http://forum.java.sun.com/thread.jsp?forum=13&thread=478054 -
Deploying CMP entity bean throws compilation error.
Jdeveloper build works fine but the server deployment ( embedded) fails. I linked tools.jar to j2ee home dir, same version as jdev uses. Session beans deploy OK.
The table corr to the entity bean has a primary key and the entity bean was created by dragging-dropping table onto UML diagram.
error is >>>cmp-field of type 'java.lang.Long' does not have a no-arg constructor which is needed for properties/fields based mapping<<<, message details follow after dashed line.
Platform details - Jdeveloper 9.0.3 on mdk 9.0, JDK 1.4.1 ( JDK 1.3.1 also does the same).
[Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.]
/usr/java/j2sdk1.4.1/bin/java -hotspot -classpath /var/jdeveloper/j2ee/home/oc4j.jar -Xverify:none -Doracle.j2ee.dont.use.memory.archive=true -Xrs com.evermind.server.OC4JServer -config /home/demo/jdevhome/system9.0.3.1035/oc4j-config/server.xml
[waiting for the server to complete its initialization...]
Embedded OC4J startup time: 9611 ms.
Copying default deployment descriptor from archive at /home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes/META-INF/orion-ejb-jar.xml to deployment directory /home/demo/jdevhome/system9.0.3.1035/oc4j-config/application-deployments/current-workspace-app/classes...
Auto-deploying file:/home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes/ (No previous deployment found)... Error compiling /home/demo/jdevhome/mywork/MyHRApplication/EJB-Tier/classes: cmp-field of type 'java.lang.Long' does not have a no-arg constructor which is needed for properties/fields based mapping
Oracle9iAS (9.0.3.0.0) Containers for J2EE initializedPlease note that the data-source has been re-architectured in 10.1.3 DP3 and you should have DataSource as follows:
<data-sources xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='http://xmlns.oracle.com/oracleas/schema/data-sources-10_1.xsd' schema-major-version='10' schema-minor-version='1'>
<managed-data-source connection-pool-name='Example Connection Pool' jndi-name='jdbc/OracleDS' name='OracleManagedDS' />
<connection-pool name='Example Connection Pool' >
<connection-factory factory-class='oracle.jdbc.pool.OracleDataSource' user='scott' password='tiger' url='jdbc:oracle:thin:@localhost:1521:orcl'>
</connection-factory>
</connection-pool>
</data-sources> -
Help: Deploying CMP Entity Bean on Jboss (DB2)
Hi, I have a problem which I have tried to solve for a couple of days now with now success.
I have deployed an ordinary Entity CMP Bean which name is Customer.
This bean has 2 fields, an id field and a customername field.
I use DB2 where the table is named customer and the fields are named as the fields in the bean, id and customername.
I have configured the db2-ds.xml file as follows, and put it in %jboss%\server\default\deploy:
<local-tx-datasource>
<jndi-name>DB2DS</jndi-name>
<connection-url>jdbc:db2://192.168.10.220:6789/business</connection-url>
<driver-class>COM.ibm.db2.jdbc.net.DB2Driver</driver-class>
<user-name>db2admin</user-name>
fuck4future
<min-pool-size>5</min-pool-size>
<max-pool-size>25</max-pool-size>
<!-- sql to call when connection is created
<new-connection-sql>some arbitrary sql</new-connection-sql>
-->
<!-- sql to call on an existing pooled connection when it is obtained from pool
<check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
-->
<!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
<type-mapping>DB2</type-mapping>
</local-tx-datasource>
I have created the jbosscmp-jdbc.xml file and put it in the META-INF directory in my ejb-application:
<jbosscmp-jdbc>
DB2DS
<!--<datasource-mapping>DB2</datasource-mapping>-->
<create-table>false</create-table>
<enterprise-beans>
<ejb-name>Customer</ejb-name>
<table-name>customers</table-name>
<cmp-field>
<field-name>id</field-name>
<column-name>id</column-name>
</cmp-field>
<cmp-field>
<field-name>companyname</field-name>
<column-name>companyname</column-name>
</cmp-field>
</enterprise-beans>
</jbosscmp-jdbc>
I have created the standardjaws.xml also in my META-INF directory of the ejb application. This file contains a lot of information (type-mappings), and starts with:
java:/DB2DS
<type-mapping>DB2</type-mapping>
false
I have the ejb-jar.xml file automaticly generated for me in my developer tool (WSAD).
When I try to start my server I get the following error:
ObjectName: jboss.j2ee:jndiName=Customer,service=EJB
state: FAILED
Depends On Me: org.jboss.deployment.DeploymentException: type-mapping is not initialized: DB2DS was not deployed or type-mapping was not configured.
ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=Customer
etc.......
Please can someone help me and give me a clue, what am I doing wrong??And this is my console :
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: c:\jboss4\bin\\..
JAVA: c:\program\java\jdk1.5.0_01\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
CLASSPATH: c:\program\java\jdk1.5.0_01\lib\tools.jar;c:\jboss4\bin\\run.jar
===============================================================================
22:36:01,986 INFO [Server] Starting JBoss (MX MicroKernel)...
22:36:01,986 INFO [Server] Release ID: JBoss [Zion] 4.0.1sp1 (build: CVSTag=JBoss_4_0_1_SP1 date=200502160314)
22:36:01,986 INFO [Server] Home Dir: C:\jboss4
22:36:01,986 INFO [Server] Home URL: file:/C:/jboss4/
22:36:01,996 INFO [Server] Library URL: file:/C:/jboss4/lib/
22:36:01,996 INFO [Server] Patch URL: null
22:36:01,996 INFO [Server] Server Name: default
22:36:01,996 INFO [Server] Server Home Dir: C:\jboss4\server\default
22:36:01,996 INFO [Server] Server Home URL: file:/C:/jboss4/server/default/
22:36:01,996 INFO [Server] Server Data Dir: C:\jboss4\server\default\data
22:36:01,996 INFO [Server] Server Temp Dir: C:\jboss4\server\default\tmp
22:36:02,006 INFO [Server] Server Config URL: file:/C:/jboss4/server/default/conf/
22:36:02,006 INFO [Server] Server Library URL: file:/C:/jboss4/server/default/lib/
22:36:02,006 INFO [Server] Root Deployment Filename: jboss-service.xml
22:36:02,006 INFO [Server] Starting General Purpose Architecture (GPA)...
22:36:02,336 INFO [ServerInfo] Java version: 1.5.0_01,Sun Microsystems Inc.
22:36:02,336 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_01-b08,Sun Microsystems Inc.
22:36:02,336 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
22:36:02,827 INFO [Server] Core system initialized
22:36:04,289 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
22:36:04,379 INFO [WebService] Using RMI server codebase: http://CYONARA:8083/
22:36:04,549 INFO [NamingService] Started jndi bootstrap jnpPort=1099, rmiPort=1098, backlog=50, bindAddress=/0.0.0.0, Client SocketFactory=null, Server SocketFactory=org.jboss.net.sockets.DefaultSocketFactory@ad093076
22:36:08,625 INFO [Embedded] Catalina naming disabled
22:36:09,246 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
22:36:09,276 INFO [Catalina] Initialization processed in 571 ms
22:36:09,276 INFO [StandardService] Starting service jboss.web
22:36:09,286 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.28
22:36:09,306 INFO [StandardHost] XML validation disabled
22:36:09,336 INFO [Catalina] Server startup in 60 ms
22:36:09,476 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=file:/C:/jboss4/server/default/deploy/http-invoker.sar/invoker.war/
22:36:10,187 INFO [TomcatDeployer] deploy, ctxPath=/ws4ee, warUrl=file:/C:/jboss4/server/default/tmp/deploy/tmp43675jboss-ws4ee-exp.war/
22:36:10,318 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=file:/C:/jboss4/server/default/deploy/jbossweb-tomcat50.sar/ROOT.war/
22:36:10,508 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=file:/C:/jboss4/server/default/deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
22:36:12,741 INFO [MailService] Mail Service bound to java:/Mail
22:36:13,272 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/jboss-local-jdbc.rar
22:36:13,412 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/jboss-xa-jdbc.rar
22:36:13,552 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/jms/jms-ra.rar
22:36:13,732 INFO [RARDeployment] Required license terms exist view the META-INF/ra.xml: file:/C:/jboss4/server/default/deploy/mail-ra.rar
22:36:14,153 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DB2DS to JNDI name 'java:DB2DS'
22:36:14,834 INFO [WrapperDataSourceService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS to JNDI name 'java:DefaultDS'
22:36:14,864 WARN [ConfiguredIdentityLoginModule] Creating LoginModule with no configured password!
22:36:15,145 INFO [A] Bound to JNDI name: queue/A
22:36:15,145 INFO Bound to JNDI name: queue/B
22:36:15,155 INFO [C] Bound to JNDI name: queue/C
22:36:15,155 INFO [D] Bound to JNDI name: queue/D
22:36:15,155 INFO [ex] Bound to JNDI name: queue/ex
22:36:15,175 INFO [testTopic] Bound to JNDI name: topic/testTopic
22:36:15,175 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
22:36:15,185 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
22:36:15,185 INFO [testQueue] Bound to JNDI name: queue/testQueue
22:36:15,235 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
22:36:15,275 INFO [DLQ] Bound to JNDI name: queue/DLQ
22:36:15,795 INFO [ConnectionFactoryBindingService] Bound connection factory for resource adapter for ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA to JNDI name 'java:JmsXA'
22:36:15,835 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C:/jboss4/server/default/deploy/jmx-console.war/
22:36:15,996 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/C:/jboss4/server/default/deploy/management/web-console.war/
22:36:16,526 INFO [EARDeployer] Init J2EE application: file:/C:/jboss4/server/default/deploy/HTC.ear
22:36:16,787 INFO [EjbModule] Deploying Customer
22:36:17,047 ERROR [EntityContainer] Starting failed jboss.j2ee:jndiName=Customer,service=EJB
org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured.
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMapping(JDBCEntityMetaData.java:1071)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:412)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy47.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:394)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy22.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:605)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
at org.jboss.Main.boot(Main.java:162)
at org.jboss.Main$1.run(Main.java:423)
at java.lang.Thread.run(Thread.java:595)
22:36:17,047 WARN [ServiceController] Problem starting service jboss.j2ee:jndiName=Customer,service=EJB
org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured.
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.getTypeMapping(JDBCEntityMetaData.java:1071)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.initStoreManager(JDBCStoreManager.java:412)
at org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager.start(JDBCStoreManager.java:353)
at org.jboss.ejb.plugins.CMPPersistenceManager.start(CMPPersistenceManager.java:157)
at org.jboss.ejb.EntityContainer.startService(EntityContainer.java:340)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy47.start(Unknown Source)
at org.jboss.ejb.EjbModule.startService(EjbModule.java:394)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy22.start(Unknown Source)
at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:605)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:956)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy8.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:277)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:272)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:222)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:891)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:416)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:261)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:964)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:775)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:722)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:144)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:413)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:310)
at org.jboss.Main.boot(Main.java:162)
at org.jboss.Main$1.run(Main.java:423)
at java.lang.Thread.run(Thread.java:595)
22:36:17,057 INFO [EJBDeployer] Deployed: file:/C:/jboss4/server/default/tmp/deploy/tmp43727HTC.ear-contents/HTC_BM_EJB.jar
22:36:17,107 INFO [TomcatDeployer] deploy, ctxPath=/HTC BM Web, warUrl=file:/C:/jboss4/server/default/tmp/deploy/tmp43727HTC.ear-contents/HTC_BM_Web-exp.war/
22:36:17,228 INFO [EARDeployer] Started J2EE application: file:/C:/jboss4/server/default/deploy/HTC.ear
22:36:17,238 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
MBeans waiting for other MBeans:
ObjectName: jboss.j2ee:jndiName=Customer,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured.
ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=Customer
state: CREATED
I Depend On:
Depends On Me:
MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM:
ObjectName: jboss.j2ee:service=EJB,plugin=pool,jndiName=Customer
state: CREATED
I Depend On:
Depends On Me:
ObjectName: jboss.j2ee:jndiName=Customer,service=EJB
state: FAILED
I Depend On:
Depends On Me: org.jboss.deployment.DeploymentException: type-mapping is not initialized: java:/DB2DS was not deployed or type-mapping was not configured. -
How to deploy CMP entity bean 2.0 ?
Dear all,
How should I write the EJB-QL for all the finder methods in my home bean during deployment? I�m using the j2sdkee-1_3_01-win to test out this bean. I have tried the following query:
SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice > ?1 but when I try to verify the bean, an error message appeared:
Error: [ SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice > ?1 ] has parsing error(s)
Here is the detail:
Test Name: tests.ejb.entity.ejbql.EjbQLFromCmpEntityDescriptor
Test Assertion: EJB 2.0 Spec Chapter 10 Container managed persistent queries should comply with specification in its sytax and semantic rules
Detailed Messages:
Error: [ SELECT OBJECT(a) FROM ProductBean AS a WHERE basePrice > ?1 ] has parsing error(s)Hope this is not too late...
SELECT OBJECT(a) FROM ProductBean AS a WHERE a.basePrice > ?1 -
Error While Deploying A CMP Entity Bean With A Composite Primary Key
Hello all,
I have a problem deploying CMP Entity beans with composite primary keys. I have a CMP Entity Bean, which contains a composite primary key composed of two local stubs. If you know more about this please respond to my post on the EJB forum (subject: CMP Bean Local Stub as a Field of a Primary Key Class).
In the mean time, can you please tell me what following error message means and how to resolve it? From what I understand it might be a problem with Sun ONE AS 7, but I would like to make sure it's not me doing something wrong.
[05/Jan/2005:12:49:03] WARNING ( 1896): Validation error in bean CustomerSubscription: The type of non-static field customer of the key class
test.subscription.CustomerSubscriptionCMP_1530383317_JDOState$Oid must be primitive or must implement java.io.Serializable.
Update the type of the key class field.
Warning: All primary key columns in primary table CustomerSubscription of the bean corresponding to the generated class test.subscription.CustomerSubscriptionCMP_1530383317_JDOState must be mapped to key fields.
Map the following primary key columns to key fields: CustomerSubscription.CustomerEmail,CustomerSubscription.SubscriptionType. If you already have fields mapped to these columns, verify that they are key fields.Is it enough that a primary key class be serializable or all fields have to implement Serializable or be a primitive?
Please let me know if you need more information to answer my question.
Thanks.
NikolaHi Nikola,
There are several problems with your CMP bean.
1. Fields of a Primary Key Class must be a subset of CMP fields, so yes, they must be either a primitive or a Serializable type.
2. Sun Application Server does not support Primary Key fields of an arbitrary Serializable type (i.e. those that will be stored
as BLOB in the database), but only primitives, Java wrappers, String, and Date/Time types.
Do you try to use stubs instead of relationships or for some other reason?
If it's the former - look at the CMR fields.
If it's the latter, I suggest to store these fields as regular CMP fields and use some other value as the PK. If you prefer that
the CMP container generates the PK values, use the Unknown
PrimaryKey feature.
Regards,
-marina -
Help about Date and Time by CMP entity bean
I should have two fields in my cmp .one stores current date ,another one stores current time while ejbcreate();
I should be able to get findmethod findobjectBetween ?! and ?2
or that sorts of find method.what type of the method should I use.
java.util.Date or Simply String?
if I use java.tuil.Date as the type.
How shoud my ejbcreate method look like?
public abstract void setDate(Date mydate);
public abstract Date getDate();
ejbCreate(String name,String password,Date mydate,Date mytime)
setDate()
I suppose I use write a business method getCurrentDate() which uses
java.util.Date().toLocale,But I think it just returns String
help pls.I am using oc4j(Oracle9iAS (9.0.3.0.0))
I am getting the following error using Timestamp while deploying cmp entity bean ejb1.1. Thanks...
Auto-deploying TimestampTestEntity.jar (No previous deployment found)... TimestampTest_EntityBeanWrapper0.java:1558: Missing term.
if (if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1558: ')' expected.
if (if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1559: Invalid expression statement.
response != null) {if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1559: ';' expected.
response != null) {if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1560: Missing term.
response.setNanos(if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1560: ')' expected.
response.setNanos(if(thread.contextContainer != null)
^
TimestampTest_EntityBeanWrapper0.java:1561: ';' expected.
response.getNanos());} // generated from BeanMethodCompilation
^
7 errors
Error compiling F:\oc4j\j2ee\home\applications\TimestampAppl/TimestampTestEntity.jar: Syntax error in source
Oracle9iAS (9.0.3.0.0) Containers for J2EE initialized -
Error in weblogic.ejbc while deploying the CMP entity bean.!!!
Tried to deploy the entity bean[CMP] with the following folder structure.
examples [package]
Product.class
productBean.class
etc.
META-INF
ejb-jar.xml
weblogic-ejb-jar.xml.
weblogic-cmp-rdbms-jar.xml
created a jar..with the following command
1.jar cvf rgegcmp.jar examples META-INF
tried to create the stubs and skeletons using weblogic.ejbc command.
2. java weblogic.ejbc rgegcmp.jar rgegcmp1.jar
C:\btcomprj\BTCOMPRJ\classes>java weblogic.ejbc rgegcmp.jar rgegcmp1.jar
<Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
class examples.ProductBean which is in
the classpath. This class should only be located in the ejb-jar file.>
<Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
class examples.ProductHome which is in
the classpath. This class should only be located in the ejb-jar file.>
<Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
class examples.Product which is in the
classpath. This class should only be located in the ejb-jar file.>
<Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
class examples.ProductLocalHome which i
s in the classpath. This class should only be located in the ejb-jar file.>
<Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
class examples.ProductLocal which is in
the classpath. This class should only be located in the ejb-jar file.>
<Oct 11, 2004 4:29:29 PM IST> <Warning> <EJB> <010054> <EJB Deployment: Product has a
class examples.ProductPK which is in th
e classpath. This class should only be located in the ejb-jar file.>
ERROR: Error from ejbc: null
java.lang.NullPointerException
at
weblogic.ejb20.deployer.CompositeMBeanDescriptor.getPersistenceUseIdentifier(Composite
MBeanDescriptor.java:1484)
at weblogic.ejb20.deployer.CMPInfoImpl.<init>(CMPInfoImpl.java:104)
at
weblogic.ejb20.deployer.EntityBeanInfoImpl.<init>(EntityBeanInfoImpl.java:135)
at
weblogic.ejb20.deployer.BeanInfoImpl.createBeanInfoImpl(BeanInfoImpl.java:349)
at
weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.initializeBeanInfos(MBeanDeploymentInf
oImpl.java:438)
at
weblogic.ejb20.deployer.MBeanDeploymentInfoImpl.<init>(MBeanDeploymentInfoImpl.java:16
5)
at weblogic.ejb20.ejbc.EJBCompiler.setupEJB(EJBCompiler.java:151)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:332)
at weblogic.ejbc20.runBody(ejbc20.java:479)
at weblogic.utils.compiler.Tool.run(Tool.java:126)
at weblogic.ejbc.main(ejbc.java:29)
ERROR: ejbc found errors
1. want to know why Null pointer exception is thrown by 'weblogic.ejbc'...
is it indicating an error in my code(bean); .....
i dont know how to fix the error.
find the deployments descriptors which i have written for deployment.
weblogic-ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC
'-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN'
'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>Product</ejb-name>
<jndi-name>rgexample</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
ejb-jar.xml
<?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>
<local-home>examples.ProductLocalHome</local-home>
<local>examples.ProductLocal</local>
<ejb-class>examples.ProductBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>examples.ProductPK</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>
<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(a) FROM ProductBean AS a WHERE 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(a) FROM ProductBean AS a WHERE 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(a) FROM ProductBean AS a WHERE 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(a) FROM ProductBean AS a WHERE 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(a) FROM ProductBean AS a WHERE basePrice < ?1]]>
</ejb-ql>
</query>
<query>
<query-method>
<method-name>findAllProducts</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM ProductBean AS a WHERE 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>
weblogic-cmp-rdbms-jar.xml
<!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>If you can have a look at a cmp example in the samples that ship with the server. My guess is that the weblogic-ejb-jar.xml file is missing the <persistence-use> element which for 810 would look like:
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
I seem to recall that the elements might be slightly different in structure for the wls700 version of the DTD, so please check that (I cannot, I'm at home and don't have everything here).
Give that a try and see if it doesn't solve your compilation failure.
Also, the compilation should not be throwing a null pointer exception in a case like that, I consider that to be a bug.
-thorick -
Error while deploying an entity bean
Hi,
I am trying to deploy an entity bean in weblogic 7.0 .
My weblogic-ejb-jar.xml has the entry as :
<weblogic-enterprise-bean>
<ejb-name>enroleejb.ManagedObjectImplHome</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>0</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
<stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
<stateless-bean-methods-are-idempotent>False</stateless-bean-methods-are-ide
mpotent>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>60</trans-timeout-seconds>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>enroleejb.ManagedObjectImplHome</jndi-name>
</weblogic-enterprise-bean>
When I run ejbc it gives the following error.
[java] The file /meta-inf/weblogic-cmp-rdbms-jar.xml, specified in a
type-storage element
of your weblogic-ejb-jar.xml descriptor, does not exist in the jar
file.
[java] at
weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(PersistenceTy
pe.java:475)
[java] at
weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceType.jav
a:407)
[java] at
weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:114)
[java] at
weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20CMPComp
iler.java:64)
[java] at
weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:223)
[java] at
weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:344)
[java] at weblogic.ejbc20.runBody(ejbc20.java:470)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[java] at weblogic.ejbc.main(ejbc.java:29)
In the generated jar file I have meta-inf\weblogic-cmp-rdbms.jar file.
Still it gives the error.
What could be the problem?
Any help would be appreciated.
Thanks,
NamrataEjb jar file should have META-INF/weblogic-cmp-rdbms-jar.xml
"Sarita Satoor" <[email protected]> wrote:
Hi,
I am trying to deploy an entity bean in weblogic 7.0 .
My weblogic-ejb-jar.xml has the entry as :
<weblogic-enterprise-bean>
<ejb-name>enroleejb.ManagedObjectImplHome</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>0</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
<stateless-bean-is-clusterable>True</stateless-bean-is-clusterable>
<stateless-bean-methods-are-idempotent>False</stateless-bean-methods-are-ide
mpotent>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>60</trans-timeout-seconds>
</transaction-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<jndi-name>enroleejb.ManagedObjectImplHome</jndi-name>
</weblogic-enterprise-bean>
When I run ejbc it gives the following error.
[java] The file /meta-inf/weblogic-cmp-rdbms-jar.xml, specified
in a
type-storage element
of your weblogic-ejb-jar.xml descriptor, does not exist in the jar
file.
[java] at
weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(PersistenceTy
pe.java:475)
[java] at
weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceType.jav
a:407)
[java] at
weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:114)
[java] at
weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(EJB20CMPComp
iler.java:64)
[java] at
weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:223)
[java] at
weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:344)
[java] at weblogic.ejbc20.runBody(ejbc20.java:470)
[java] at weblogic.utils.compiler.Tool.run(Tool.java:126)
[java] at weblogic.ejbc.main(ejbc.java:29)
In the generated jar file I have meta-inf\weblogic-cmp-rdbms.jar file.
Still it gives the error.
What could be the problem?
Any help would be appreciated.
Thanks,
Namrata -
Error while using sybase trigger with the CMP entity bean,ejb version 2.1
Hi All,
I am using ejb version 2.1 and using entity bean (Transaction required) ,i am trying to update data in sybase(ver 12.3) database table
I am using session bean(Transaction required) to update the multiple entity beans in a while loop.It is working fine .But when i am trying to run it with the trigger which updates multiple tables in different sybase databases on update of each entity.Then it throws NoSuchEntityException and it rollback the whole transaction.
My trigger has only few simple update statements and the trigger runs fine without my CMP entity bean.is the CMP does not support the update triggers in sybase or is it the problem with the transaction.
Please help
Thanks
AnshuIf you can have a look at a cmp example in the samples that ship with the server. My guess is that the weblogic-ejb-jar.xml file is missing the <persistence-use> element which for 810 would look like:
<persistence>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-use>
</persistence>
I seem to recall that the elements might be slightly different in structure for the wls700 version of the DTD, so please check that (I cannot, I'm at home and don't have everything here).
Give that a try and see if it doesn't solve your compilation failure.
Also, the compilation should not be throwing a null pointer exception in a case like that, I consider that to be a bug.
-thorick -
Exception in calling a CMP Entity Bean
I have deployed a simple CMP entity bean using jboss App. server, Now while executing the client i got the following exception,
error in clientjavax.naming.CommunicationException [Root exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: org.jnp.interfaces.FastNamingProperties (no security manager: RMI class loader disabled)]
regards,
NaveenBabu.AHi,
It is likely that some libraries are missing in your client environment. (it has nothing to do with security)
Make sure that the libraries in JBoss client (folder your_jboss_folder/client) are in your client application classpath. In particular, look for jnp-client.jar.
This should solve the problem.
Bruno Collet
http://www.practicalsoftwarearchitect.com -
CMP Entity Bean's problem with MS-SQL Server 2000
Hi everyone!
I have a problem regarding CMP Entity Bean on OC4J.
I made one CMP Entity Bean and deployed it to OC4J.
It was successful.
I used MS-SQL Server 2000 as Datasource.
So, I installed MS-SQL Server's JDBC Driver and add some jar files to classpath.
And I updated 'data-sources.xml' in OC4J's config directory.
Then, I updated also 'orion-ejb-jar.xml' in my application's directory.
I changed data-source's name to my data-source's name which use MS-SQL Server 2000.
Finally, I started OC4J and EJB Client program which called Enitiy Bean's create method.
But, The error occured which was 'Database error: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]LINE 1: '.' Wrong sentence'.
What's wrong? I need any helps.
Here is stack overflow message. Thank you. Best regards.
com.evermind.server.rmi.OrionRemoteException: Transaction was rolled back: Database error: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]LINE 1: '.' Wrong sentence.
at UserHome_EntityHomeWrapper2.create(UserHome_EntityHomeWrapper2.java:1114)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:80)
at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)
at connection to localhost/127.0.0.1 as admin
at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1530)
at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1453)
at com.evermind.server.rmi.RemoteInvocationHandler.invoke(RemoteInvocationHandler.java:53)
at com.evermind.server.rmi.RecoverableRemoteInvocationHandler.invoke(RecoverableRemoteInvocationHandler.java:22)
at __Proxy0.create(Unknown Source)
at com.emc.ksc.ejb.user.UserBeanTestClient1.create(UserBeanTestClient1.java:73)
at com.emc.ksc.ejb.user.UserBeanTestClient1.<init>(UserBeanTestClient1.java:49)
at com.emc.ksc.ejb.user.UserBeanTestClient1.main(UserBeanTestClient1.java:1077)Hi Young,
From the information you have supplied, my guess is that the SQL
string that OC4J is sending to SQL-Server is incorrect. So it may
help if you could see the exact SQL string. In order to see the
SQL string, I suggest you either run OC4J in "debug" mode, or try
using "P6 Spy".
The following web page has details on running OC4J in "debug" mode:
http://kb.atlassian.com/content/atlassian/howto/orionproperties.jsp
And here is the web page for "P6 Spy"
http://www.provision6.com/
And these other web sites may also be of help (in general):
http://www.orionserver.com
http://www.orionsupport.com
http://www.atlassian.com
http://www.elephantwalker.com
Good Luck,
Avi.
Maybe you are looking for
-
Trying to connect IMac to Lion server (network account)
Hello, I have been trying to get this to work for a few weeks now. I have 2 Imacs and a Macbook, i am trying to login to a network account. I did the step by step to set up my server. I can screen share and see all the shared folders. I have
-
Distribute spacing value needs to be sticky
The Distribute Spacing value needs to remain sticky based on the last value I gave it. If I have previously distributed a series of objects to a set spacing value and then set it back to Auto prior to distributing another series of objects the value
-
Satellite A200 - Built-in camera is missing
Hi :) First of all thank you in advance for your help. I got a Satellite A200 without HDD, so I installed Vista 64 Bits in a new empty Disk... everything is alright but the built-in Chicony camera is missing in the Device Mannager, I tried reinstalli
-
How remember previous value?
Hi all, I am working on a page, which is implmented using jsp and servlet. It shows alot options(radio button) in several pages, and user can browser next/previous page. My question is how to let jsp remember the selected option, after user browsers
-
IMac Glossy Screens and Calibration
I talked to an Apple store rep the other week and when I asked when Apple would ever get a matte screen for their iMacs, she replied why did I want one? I replied that I do photographic work and the glossy screens were difficult to work with. "What?