Ejb-jar.xml gets corrupted..at the time of deployment
Hi,
I'm Implemnting an application for Ejb's in WebDynpro.
I'm conncting my database table in java dictionary to Webdynpro Interface using EJB.
I have used the follwing link...
Link: Consuming EJBs in web dynpro Using java dictionary
But i'm facing 2 problms
First one is when i write code in command bean that is a java file, It gives error for Create maethode for argumnts..
when i try to do sme changes wid this create method a new create method gets creatd..
second problm is when i do sme changes wid coding Ejb-jar.xml file gets corruptd 7 shows Error message..
tent of element type "enterprise-beans" is incomplete, it must match "(session|entity|message-driven)".+
Can Anybody temme why is it hppning ????
All hlpfull posts will be cherished.
Regards,
Khushboo Singhal
I have solved this problem via adding Beans to xml files..
Similar Messages
-
Access ejb-jar.xml progrmmatically for viewing the user roles and methods
We are using Weblogic 8.1 sp 4 (jdk 1.4.2). Is there any way within our application where we can display all the methods a user can access and all the roles available within ejb-jar.xml ?
Thanks in Advance
DRGLocal interfaces are for communication between ejbs and their clients when both are in the same JVM. The clients can be normal clients, jsps, servlets, and other ejbs. If the client is not in the same JVM you cannot use local interfaces even though your client is another ejb.
Advantage of using local interface is it reduces the network overhead.
For more information you can download Mastering Enterprise Java Beans Third Edition by Ed Roman. You can go through 45
You can download pdf version from.
http://www.theserverside.com/books/wiley/masteringEJB/index.tss.
Let me know the URL of the ejb doc that you referred.
Thanks.. -
Error while migrating orion-ejb-jar.xml from OC4J 9.0.4.1
I am trying to use Toplink migration tool to take our existing orion-ejb-jar.xml file and toplink-ejb-jar.xml file to new 10.1.3 deployment. While running the migration tool I get the following error
WARNING: Oc4j native CMP setting optimistic-locking on
entity(TransactionTypeEntityBean) is not migrated and supported.
java.lang.IllegalArgumentException: MWDatabaseField[9BE2B5]
(TAX_RULE.TAX_RULE_ID)
at
oracle.toplink.workbench.mappingsmodel.desc.relational.MWRelationalPrima
ryKeyPolicy.addPrimaryKey(MWRelationalPrimaryKeyPolicy.java:99)
at
oracle.toplink.tools.migration.RuntimeCMPProjectToMWProjectConverter.con
vertDescriptor(RuntimeCMPProjectToMWProjectConverter.java:297)
at
oracle.toplink.tools.migration.RuntimeCMPProjectToMWProjectConverter.con
vertDescriptors(RuntimeCMPProjectToMWProjectConverter.java:265)
at
oracle.toplink.tools.migration.RuntimeCMPProjectToMWProjectConverter.con
vertProject(RuntimeCMPProjectToMWProjectConverter.java:144)
at
oracle.toplink.tools.migration.MigrationManagerBase.convertAndWriteoutMW
Project(MigrationManagerBase.java:369)
at
oracle.toplink.tools.migration.MigrationManagerBase.migrate(MigrationMan
agerBase.java:358)
at
oracle.toplink.tools.migration.io.MigrationIOManager.buildMigratedJarFil
e(MigrationIOManager.java:243)
at
oracle.toplink.tools.migration.io.MigrationIOManager.operateEarEntry(Mig
rationIOManager.java:181)
at
oracle.toplink.tools.migration.io.MigrationIOManager.operateEar(Migratio
nIOManager.java:145)
at
oracle.toplink.tools.migration.io.MigrationIOManager.operateIO(Migration
IOManager.java:88)
at
oracle.toplink.tools.migration.MigrationManagerBase.startMigration(Migra
tionManagerBase.java:280)
at
oracle.toplink.tools.migration.MigrationManagerBase.run(MigrationManager
Base.java:121)
at
oracle.toplink.tools.migration.MigrationManagerBase.run(MigrationManager
Base.java:97)
at
oracle.toplink.tools.migration.TopLinkCMPMigrator.main(TopLinkCMPMigrato
r.java:59)Hello,
The warning message looks to be unrelated to the java.lang.IllegalArgumentException error. The warning states that optimistic locking cannot be migrated to the toplink-ejb-jar.xml file; this is stated in chapter 7 of the TopLink developer's guide at
http://download-west.oracle.com/otn_hosted_doc/toplink/1013/MAIN/_pdf/b13593_v1_01.pdf
The exception though seems to indicate that your orion-ejb-jar.xml contains EJBs mapped to the same table that are not related through EJB inheritance. I do it all the time with POJOs so this will work in TopLink, but you will need a support case to help get your project migrated if this is the case.
Best Regards,
Chris Delahunt -
JDeveloper / OC4J rewriting my orion-ejb-jar.xml
Hi All.
Im having a play around with OC4J and CMP entity beans and struts at the moment learning some stuff for a new job, so ive started to write a little test app to get used to things.
Ive created a CMP entity - CustomerEntityEJB, manually defined the tables etc wrote and built it using JDeveloper 10.
Ive created all the necessary classes and descriptors in JDeveloper and the bean compiles and deploys fine, however no matter what i do, the table attribute of the <entity-deployment> elemnt is ALWAYS removed from the orion-ejb-jar.xml file before its deployed and i have no idea why.
Here are some snippets form the xml config files im using....
ejb-jar.xml :
<entity>
<description>Entity Bean ( CMP )</description>
<display-name>CustomerEntityEJB</display-name>
<ejb-name>CustomerEntityEJB</ejb-name>
<local-home>com.gb.ejb.entity.customer.CustomerEntityEJBLocalHome</local-home>
<local>com.gb.ejb.entity.customer.CustomerEntityEJBLocal</local>
<ejb-class>com.gb.ejb.entity.customer.CustomerEntityEJBBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.Long</prim-key-class>
<reentrant>false</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>CustomerEntityEJB</abstract-schema-name>
<cmp-field>
<field-name>id</field-name>
</cmp-field>
<cmp-field>
<field-name>title</field-name>
</cmp-field>
<cmp-field>
<field-name>forename</field-name>
</cmp-field>
<cmp-field>
<field-name>surname</field-name>
</cmp-field>
<cmp-field>
<field-name>email</field-name>
</cmp-field>
<cmp-field>
<field-name>password</field-name>
</cmp-field>
<cmp-field>
<field-name>active</field-name>
</cmp-field>
<primkey-field>id</primkey-field>
<query>
<query-method>
<method-name>findAll</method-name>
<method-params/>
</query-method>
<ejb-ql>SELECT OBJECT(c) FROM CustomerEntityEJB c</ejb-ql>
</query>
</entity>
orion-ejb-jar.xml as in JDeveloper:
<?xml version = '1.0' encoding = 'windows-1252'?>
<orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" schema-major-version="10" schema-minor-version="0">
<enterprise-beans>
<persistence-manager name="toplink"/>
<session-deployment name="CustomerSessionEJB" local-location="CustomerSessionEJB" />
<entity-deployment name="CustomerEntityEJB" data-source="jdbc/PostgresDS" table="Customer" local-location="CustomerEntityEJB">
<primkey-mapping>
<cmp-field-mapping name="id"/>
</primkey-mapping>
<cmp-field-mapping name="active"/>
<cmp-field-mapping name="email"/>
<cmp-field-mapping name="forename"/>
<cmp-field-mapping name="id"/>
<cmp-field-mapping name="password"/>
<cmp-field-mapping name="surname"/>
<cmp-field-mapping name="title"/>
</entity-deployment>
</enterprise-beans>
</orion-ejb-jar>
orion-ejb-jar.xml as viewed in the OC4J enterprise manager.
<?xml version="1.0" encoding="utf-8"?>
<orion-ejb-jar xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://xmlns.oracle.com/oracleas/schema/orion-ejb-jar-10_0.xsd" deployment-version="10.1.3.3.0" deployment-time="1151415a0e3" schema-major-version="10" schema-minor-version="0" >
<enterprise-beans>
<persistence-manager name="toplink" class="oracle.toplink.internal.ejb.cmp.oc4j.Oc4jPersistenceManager" descriptor="toplink-ejb-jar.xml">
</persistence-manager>
<session-deployment name="CustomerSessionEJB" location="CustomerSessionEJB" local-location="CustomerSessionEJB" persistence-filename="CustomerSessionEJB">
<ejb-ref-mapping name="ejb/local/CustomerEntityEJB" location="TWA-EJB_CustomerEntityEJBLocal" />
</session-deployment>
<entity-deployment name="CustomerEntityEJB" location="CustomerEntityEJB" local-location="CustomerEntityEJB" concrete-bean-class="CustomerEntityEJB_ConcreteSubClass3" data-source="jdbc/PostgresDS" local-wrapper="CustomerEntityEJBLocalHome_LocalEntityHomeWrapper5">
</entity-deployment>
</enterprise-beans>
<assembly-descriptor>
<default-method-access>
<security-role-mapping name="<default-ejb-caller-role>" impliesAll="true" />
</default-method-access>
</assembly-descriptor>
</orion-ejb-jar>
As you can see, the orion-ejb-jar.xml that been deployed on the server has had extra attributes defined in it (like concrete-bean-class) which makessense - its adding in the bits i didnt to get th bean to deploy - however the table attribue is just removed, meaning my bean cant find the table - hence my app not working.
i just dont know how to stop this and would be extremely grateful if someone could give me a clue how to get my bean up and working properly as this is driving me insane.
Thanks in advance..
Gareth.sorted - the <persistence-manager name="toplink"/> element was automatically generated by JDeveloper and put in my orion-ejb-jar.xml appears to be un necessary and seemed to be breaking eveything - as soon as i removed it, the bean seemed to deploy ok and pick up the table name =]
as a bit of an aside does anyone know why it was automatically put there in the first place if it breaks things? -
Ejb-jar.xml parse excpetion...
Could someone please take a look at my ejb-jar.xml code and try to see the error in it?
I am trying to load this jar into WebLogic 6.1 and when i try and deploy the bean i get the following exception:
Unable to deploy EJB: RequestBean.jar from RequestBean.jar:
The XML parser encountered an error in your deployment descriptor. Please ensure that your deployment descriptor corresponds to the format in the DTD. The error was:
org.xml.sax.SAXParseException: The content of element type "ejb-jar" must match "(description?,display-name?,small-icon?,large-icon?,enterprise-beans,relationships?,assembly-descriptor?,ejb-client-jar?)".
Here is the xml behind my ejb-jar.xml file:
<!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>
<session>
<ejb-name>RequestResearch</ejb-name>
<home>com.weblogic.RequestResearchHome</home>
<remote>com.weblogic.RequestResearchRemote</remote>
<ejb-class>com.weblogic.RequestResearchBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
<enterprise-beans>
<session>
<ejb-name>RequestDataManager</ejb-name>
<local>com.weblogic.RequestDataManagerLocal</local>
<local-home>com.weblogic.RequestDataManagerLocalHome</local-home>
<ejb-class>com.weblogic.RequestDataManagerBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Bean</transaction-type>
</session>
</enterprise-beans>
</ejb-jar>Thanks for your time,
NateI also get the following exception right below the exception posted in the first post:
org.xml.sax.SAXParseException: The content of element type "ejb-jar" must match "(description?,display-name?,small-icon?,large-icon?,enterprise-beans,relationships?,assembly-descriptor?,ejb-client-jar?)".]
File: ejb-jar.xml Line: 14 Column: 21
The nice thing about this exception is it shows the row and column. However, I can't figure out where this is in the ejb-jar.xml file? Does the parser smoosh everthing together and count from there? Or does the parser count from my formatting?
Thanks again for your time,
Nathan -
Weblogic 10.3.0 Deployment error when using ejb-jar.xml
Hi,
I am getting the following error while deploying my EJB3 application on Weblogic 10.3.0. This is happening only if I include ejb-jar.xml.
As per the EJB3 descriptor spec, Remote Home or Local home are not exists.
Is this a issue in Weblogic 10.3.0 or am I missing any special setup ?
Please help.
weblogic.application.ModuleException: Exception preparing module: EJBModule(egm-poc.jar)
Unable to deploy EJB: C:\appsrv\domains\WeblogicRS1.1-domain\servers\admin\tmp\_WL_user\_appsdir_egmear_ear\ot2591\egm-poc.
jar from egm-poc.jar:
In EJB JPATestBean, both the remote home and remote component interface must be specified. Currently, only one of them is spec
ified.
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
My ejb-jar.xml is
- <ejb-jar version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
<description>JPA Test Application</description>
<display-name>JPATest</display-name>
- <enterprise-beans>
- <session>
<ejb-name>JPATestBean</ejb-name>
<remote>egm.poc.jpa.JPATestBeanRemote</remote>
<local>egm.poc.jpa.JPATestBeanLocal</local>
<ejb-class>egm.poc.jpa.JPATestBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
- <session>
<ejb-name>AuditInfoDAOH</ejb-name>
<local>egm.poc.jpa.Audit</local>
<ejb-class>egm.poc.jpa.AuditInfoDAOH</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
</enterprise-beans>
- <assembly-descriptor>
- <container-transaction>
- <method>
<ejb-name>JPATestBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>RequiresNew</trans-attribute>
</container-transaction>
- <container-transaction>
- <method>
<ejb-name>AuditInfoDAOH</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
Regards
SajiHi,
Seems the issue is not common. Can anyone throw some light on this ?
Regards
Saji -
External Entity Problem w/ ejb-jar.xml
I cannot figure out nor find how to have the ejb-jar.xml refer to external entities
so that it doesn't get overly large and unmanageable. Note: our "shared-ejb-jar.xml"
gets converted into "ejb-jar.xml" inside of a deployed shared.jar file.
The shared-ejb-jar.xml file contains:
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'
<!ENTITY SatelliteExt SYSTEM "satellite-ext.xml">
]>
........XML code.........
&SatelliteExt;
........XML code.........
The satellite-ext.xml file is in the same directory and contains the XML to describe
a single <entity>...</entity>.
I use ant to compile and receive this error:
C:\jist\bin\build.xml:74: SAXException while parsing 'shared-ejb-jar.xml'. This
probably indicates badly-formed XML. Details: Relative URI "satellite-ext.xml";
can not be resolved without a document URI.
Any help will be most appreciated.
-- GuyProblem is resolved. Thanks for looking over this thread.
Regards
Karthik -
JNDI and env. vars. in ejb-jar.xml
I have been trying for several days now to have my EJB session bean access
its env. vars. stored in the ejb-jar.xml document. I have been unsuccessful.
The only place I have been able to store my env. vars. is in the web.xml
document outside my .jar file. Although workable, it would be preferable to
store them in the ejb-jar.xml document in my .jar file.
I am hoping some one can help me. I am using the following code in my ejb:
Context init = new InitialContext();
Context env = (Context)init.lookup("java:comp/env");
m_bTruncCorporate =
((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
My ejb-jar.xml follows:
<!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>
<session>
<ejb-name>MICRworksBean</ejb-name>
<home>USDataworks.MICRworks.MICRworksHome</home>
<remote>USDataworks.MICRworks.MICRworks</remote>
<ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<description>Flag indicating whether to convert corporate
checks</description>
<env-entry-name>TruncateCorporate</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<description>Location of the 1For1 exclusion files</description>
<env-entry-name>OptionFilePath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-value
>
</env-entry>
<env-entry>
<description>Name of the 1For1 account exclusions file</description>
<env-entry-name>OptionFileAccount</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>account_file.txt</env-entry-value>
</env-entry>
<env-entry>
<description>Name of the 1For1 routing exclusion file</description>
<env-entry-name>OptionFileRouting</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>routing_file.txt</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MICRworksBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
and my weblogic-ejb-jar.xml:
<!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>MICRworksBean</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<jndi-name>MICRworksBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
My feeling is that I am missing some sort of reference in the
weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried several
things without success.
I would appreciate any help I can get...especially if it contains specific
code I can use as I am rather new to writing and deploying ejbs!
Thanx in advance. Marek :-)Thanks for the reference. I was using another book as a reference (Using
Java 2 Enterprise Edition by Mark Wutka) which had the same sort of example
and as you can see below, I coded my bean as they suggest...I'm still unable
to access the env. vars.!
I deployed by bean using WebLogic's Builder and but didn't create any sort
of application. I let WebLogic do what it would on its own. The WebLogic
documentation seemed to indicate for simple testing this would work
fine...is it wrong?
btw. MICRworks.MICR_ENV_TRUNCORP equates to "TruncateCorporate" as you
probably guessed.
The WebLogic Admin Console shows the environment variables in the EJB
Descriptors for my EJB but they do not show up when I view the JNDI tree for
my server. I have taken this to mean that the deployment tool is not
binding my env. vars. for some reason which would explain why my bean can't
find them.
I know it must be something stupid I am doing (or not doing) but I just
can't see it. Please help!
"Ryan LeCompte" <[email protected]> wrote in message
news:[email protected]...
>
Hello Marek,
I would suggest that you download the free book "Mastering EJB 2ndEdition" by
Ed Roman, Scott Ambler, and Tyler Jewell. The source code for the book isalso
freely available and is meant to be deployed specifically on WebLogic.Look for
a sample application called "Jasmine", which shows how to use environmententries.
You will see a concrete example of how they are defined and later accessedfrom
within EJBs. The book and source code are available at the followingaddress:
>
http://www.theserverside.com/books/masteringEJB/index.jsp
Best regards,
Ryan LeCompte
[email protected]
http://www.louisiana.edu/~rml7669
"Marek Kossak" <[email protected]> wrote:
I have been trying for several days now to have my EJB session bean
access
its env. vars. stored in the ejb-jar.xml document. I have beenunsuccessful.
The only place I have been able to store my env. vars. is in the web.xml
document outside my .jar file. Although workable, it would be preferable
to
store them in the ejb-jar.xml document in my .jar file.
I am hoping some one can help me. I am using the following code in my
ejb:
Context init = new InitialContext();
Context env = (Context)init.lookup("java:comp/env");
m_bTruncCorporate =
((Boolean)env.lookup(MICRworks.MICR_ENV_TRUNCORP)).booleanValue();
m_strOptPath = (String)env.lookup(MICRworks.MICR_ENV_OPFLPATH);
m_strOptAccount = (String)env.lookup(MICRworks.MICR_ENV_OPFLACCT);
m_strOptRouting = (String)env.lookup(MICRworks.MICR_ENV_OPFLROUT);
My ejb-jar.xml follows:
<!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>
<session>
<ejb-name>MICRworksBean</ejb-name>
<home>USDataworks.MICRworks.MICRworksHome</home>
<remote>USDataworks.MICRworks.MICRworks</remote>
<ejb-class>USDataworks.MICRworks.MICRworksBean</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
<env-entry>
<description>Flag indicating whether to convert corporate
checks</description>
<env-entry-name>TruncateCorporate</env-entry-name>
<env-entry-type>java.lang.Boolean</env-entry-type>
<env-entry-value>true</env-entry-value>
</env-entry>
<env-entry>
<description>Location of the 1For1 exclusion files</description>
<env-entry-name>OptionFilePath</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>http://localhost:7001/MICRworksLite/files/</env-entry-valu
e
>>>
</env-entry>
<env-entry>
<description>Name of the 1For1 account exclusions file</description>
<env-entry-name>OptionFileAccount</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>account_file.txt</env-entry-value>
</env-entry>
<env-entry>
<description>Name of the 1For1 routing exclusion file</description>
<env-entry-name>OptionFileRouting</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>routing_file.txt</env-entry-value>
</env-entry>
</session>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MICRworksBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Supports</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
and my weblogic-ejb-jar.xml:
<!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>MICRworksBean</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<jndi-name>MICRworksBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
My feeling is that I am missing some sort of reference in the
weblogic-ejb-jar.xml that points to the ejb-jar.xml but I have tried
several
things without success.
I would appreciate any help I can get...especially if it containsspecific
code I can use as I am rather new to writing and deploying ejbs!
Thanx in advance. Marek :-) -
Deployment issues, how is weblogic-ejb-jar.xml linked to ejb-jar.xml
Hey guys,
I'm getting the following error I think because i have something configured incorrectly in my xml files. Instead of yousing activationConfig properties in my MDB I wanted to set them in the ejb-jar.xml file manually. The following error I'm getting is...
Unable to deploy EJB: MyMDB from MDBtest2:
[EJB:011026]The EJB container failed while creating the java:/comp/env namespace for this EJB deployment.
weblogic.deployment.EnvironmentException: [EJB:010176]The resource-env-ref 'inQueue' declared in the ejb-jar.xml descriptor has no JNDI name mapped to it. The resource-ref must be mapped to a JNDI name using the resource-description element of the weblogic-ejb-jar.xml descriptor.
at weblogic.ejb.container.deployer.EnvironmentBuilder.addResourceEnvReferences(EnvironmentBuilder.java:641)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentContext(EJBDeployer.java:330)
at weblogic.ejb.container.deployer.EJBDeployer.setupEnvironmentFor(EJBDeployer.java:1097)
at weblogic.ejb.container.deployer.EJBDeployer.setupBeanInfos(EJBDeployer.java:991)
at weblogic.ejb.container.deployer.EJBDeployer.prepare(EJBDeployer.java:1273)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:372)
ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
<display-name>MDBtest2</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB</ejb-name>
<ejb-class>cms.crown.mdb.MyMDB</ejb-class>
<transaction-type>Container</transaction-type>
<message-destination-link>omg</message-destination-link>
<resource-ref>
<res-ref-name>weblogic.jms.XAConnectionFactory</res-ref-name>
<res-type>javax.jms.XAConnectionFactory</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-env-ref>
<resource-env-ref-name>inQueue</resource-env-ref-name>
<resource-env-ref-type>javax.jms.Queue</resource-env-ref-type>
</resource-env-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>MyMDB</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
weblogic-ejb-jar.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-ejb-jar xmlns:wls="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
<!--weblogic-version:10.0-->
<wls:message-destination-descriptor>
<!--lookup-method:JNDI-->
<wls:message-destination-name>omg</wls:message-destination-name>
<wls:destination-jndi-name>inQueue</wls:destination-jndi-name>
<wls:initial-context-factory>weblogic.jms.XAConnectionFactory</wls:initial-context-factory>
<wls:provider-url>http://localhost:8010</wls:provider-url>
</wls:message-destination-descriptor>
</wls:weblogic-ejb-jar>
Hope this is readable, thanks for any assistanceHi,
It looks like first thing you are using EJB3 but your XML files are still pointing to version="2.1" and very old.
<font color=red>
<ejb-jar id="ejb-jar_ID" version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee "http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">
</font><br>
*try this: In below "ejb-jar.xml" file*
QCF = your Connection factory JNDI Name
TestQ = your Queue JNDI Name
Transaction Attribute is ByDefault = Required ...so no need to add it here.
<?xml version='1.0' encoding='UTF-8'?>
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" metadata-complete="true">
<enterprise-beans>
<message-driven>
<ejb-name>MyMDB</ejb-name>
<mapped-name>TestQ</mapped-name>
<ejb-class>cms.crown.mdb.MyMDB</ejb-class>
<messaging-type>javax.jms.MessageListener</messaging-type>
<transaction-type>Container</transaction-type>
<activation-config>
<activation-config-property>
<activation-config-property-name>destinationType</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>javax.jms.Queue</font></b></activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>connectionFactoryJndiName</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>QCF</font></b></activation-config-property-value>
</activation-config-property>
<activation-config-property>
<activation-config-property-name>destinationJndiName</activation-config-property-name>
<activation-config-property-value><b><font color=maroon>TestQ</font></b></activation-config-property-value>
</activation-config-property>
</activation-config>
</message-driven>
</enterprise-beans>
<assembly-descriptor></assembly-descriptor>
</ejb-jar>
"weblogic-ejb-jar.xml":
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-ejb-jar http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">
<font color=maroon><b> Now u need to Just define the Provider URL here...if you want a remote provider...else not required<BR> JNDI names are already defined in the ejb-jar.xml file</b></font><BR>
</weblogic-ejb-jar>
Some Links which you can refer:
To Generate the Deployment Descriptors ...in case of EJB3 Applications: *http://jaysensharma.wordpress.com/2010/04/02/generating-ejb3-clientjar/*
MDB3.0 Sample: *http://jaysensharma.wordpress.com/2009/08/17/mdb3-0-sample-for-weblogic-application-server/*
Thanks
Jay SenSharma -
Hi,
I like to write a wrapper of an existing J2EE bean.
- I make an new EJB Module
- Add my JAR-File in properties for my EJB module
- Then right click the ejb-jar.xml node to add my bean with the Add EJBs entry.
It works perfect, but when I close my Developers Studio and reopen it the ejb-jar-xml is corrupt and I can´ t compile it anymore!
Can someone please help?
PeterHere it is my new weblogic-ejb-jar.xml ( snippet):
<weblogic-enterprise-bean>
<ejb-name>RegistrationInfo</ejb-name>
<entity-descriptor>
<entity-cache><max-beans-in-cache>100</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>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/auctiondb</res-ref-name>
<jndi-name>auctiondb</jndi-name>
</resource-description>
<ejb-local-reference-description>
<ejb-ref-name>ejb/PaymentInfo</ejb-ref-name>
<jndi-name>PaymentInfoLocalHome</jndi-name>
</ejb-local-reference-description>
<ejb-local-reference-description>
<ejb-ref-name>ejb/AddressInfo</ejb-ref-name>
<jndi-name>AddressInfoLocalHome</jndi-name>
</ejb-local-reference-description>
<ejb-local-reference-description>
<ejb-ref-name>ejb/BidInfo</ejb-ref-name>
<jndi-name>BidInfoLocalHome</jndi-name>
</ejb-local-reference-description>
<ejb-local-reference-description>
<ejb-ref-name>ejb/SaleInfo</ejb-ref-name>
<jndi-name>SaleInfoLocalHome</jndi-name>
</ejb-local-reference-description>
</reference-descriptor>
<jndi-name>RegistrationInfoLocalHome</jndi-name>
<local-jndi-name>RegistrationInfoLocal</local-jndi-name>
</weblogic-enterprise-bean> -
ERROR: Error parsing 'ejb-jar.xml'
Hello ppls,
i am getting the following error while compiling using ejbc :
ERROR: Error parsing 'ejb-jar.xml' line 25: The content of element
type "entity"
must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,
my ejb-jar.xml looks like this
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'
>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Account</ejb-name>
<home>wlEntityBeanexample.AccountHome</home>
<remote>wlEntityBeanexample.Account</remote>
<ejb-class>wlEntityBeanexample.HelloBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<transaction-type>Container</transaction-type>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<resource-ref>
<res-ref-name>mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Account</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
<ejb-client-jar>AccountClient<ejb-client-jar>
</ejb-jar>
I compared the file with other ejb-jar.xml file coming as an Example
in Weblogic, i didn't find any difference.
Thanks in Advance,
PrashantThanks Deepak, i got it running at last.
Prashant
"Deepak Vohra" <[email protected]> wrote in message news:<[email protected]>...
The entity element in ejb-jar.xml should be of the
format:
<!ELEMENT entity (description?, display-name?, small-icon?,
large-icon?, ejb-name, home?, remote?, local-home?,
local?, ejb-class, persistence-type, prim-key-class,
reentrant, cmp-version?, abstract-schema-name?,
cmp-field*, primkey-field?, env-entry*, ejb-ref*,
ejb-local-ref*, security-role-ref*, security-identity?,
resource-ref*, resource-env-ref*, query*)>
transaction-type is not defined for a entity ejb.
<entity> <ejb-name>Account</ejb-name> <home>wlEntityBeanexample.AccountHome</home>
<remote>wlEntityBeanexample.Account</remote> <ejb-class>wlEntityBeanexample.HelloBean</ejb-class>
<persistence-type>Bean</persistence-type> <prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant> <cmp-version>2.x</cmp-version>
<resource-ref> <res-ref-name>mysql</res-ref-name> <res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth> </resource-ref>
</entity>
[email protected] (prashant) wrote:
Hello ppls,
i am getting the following error while compiling using ejbc :
ERROR: Error parsing 'ejb-jar.xml' line 25: The content of element
type "entity"
must match "(description?,display-name?,small-icon?,large-icon?,ejb-name,home?,
my ejb-jar.xml looks like this
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://www.java.sun.com/j2ee/dtds/ejb-jar_2_0.dtd'
>
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>Account</ejb-name>
<home>wlEntityBeanexample.AccountHome</home>
<remote>wlEntityBeanexample.Account</remote>
<ejb-class>wlEntityBeanexample.HelloBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<transaction-type>Container</transaction-type>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<resource-ref>
<res-ref-name>mysql</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>Account</ejb-name>
<method-intf>Remote</method-intf>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
<ejb-client-jar>AccountClient<ejb-client-jar>
</ejb-jar>
I compared the file with other ejb-jar.xml file coming as an Example
in Weblogic, i didn't find any difference.
Thanks in Advance,
Prashant -
Toplink-ejb-jar.xml config with weblogic-ejb-jar.xml
Hello,
To use toplink with EJB's deployed in Weblogic.
I changed weblogic-ejb-jar.xml :
(Because, it does not allow me to change <type-identifier> and <type-version> elements)
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/toplink-ejb-jar.xml</type-storage>
Here, is the toplink-ejb-jar.xml:
(Because, I am asked to give PUBLIC value for Weblogic 8.1.0....)
<!DOCTYPE toplink-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN" "file://D:/Toplink10g/toplink/config/dtds/toplink-wls-ejb-jar_10_0_3.dtd">
<toplink-ejb-jar>
<session>
<name>myUniqueSession</name>
<project-xml>META-INF/project.xml</project-xml>
<login>
<connection-pool>demoPool</connection-pool>
</login>
</session>
</toplink-ejb-jar>
1. I have also given full path to the "toplink-wls-ejb-jar_10_0_3.dtd", but I still get parsing error:
"myBeans.jar": [EJB:011019]While reading META-INF/toplink-ejb-jar.xml, the persistence layer of the Entity EJB failed to deploy. The error was:
"myBeans.jar": Error in descriptor line 5: Error parsing file at line: 5 column: 18. Element type "toplink-ejb-jar" must be declared..
2. Also, How I can avoid the full path to the DTD???
Thanks for your help in this regard!You are not properly configured to use TopLink with Weblogic. You need to place the TopLink_CMP_Descriptor.xml install file in your Weblogic lib/persistence directory. Add "TopLink_CMP_Descriptor.xml" to your persistence.install file and then update weblogic-ejb-jar.xml to reference the correct TopLink persistence type and versions, ie,
<type-identifier>TopLink_CMP_2_0</type-identifier>
<type-version>10</type-version>
<type-storage>META-INF/toplink-ejb-jar.xml</type-storage>
See the TopLink developer guide for more information and configuration details.
http://download-east.oracle.com/docs/cd/B10464_05/web.904/b10313/pkg_depl.htm#1124524
Cheers,
Guy -
Error defining transaction-isolation at weblogic-ejb-jar.xml
Hi,
.. from WebLogic 5.1 reference:
(...) the top level elements in weblogic-ejb-jar.xml are as follows:
. description
. weblogic-version
. weblogic-enterprise-bean
. ejb-name
. caching-descriptor
. presistence-descriptor
. clustering-descriptor
. transaction-descriptor
. reference-descriptor
. enable-call-by-reference
. jndi-name
. TRANSACTION-ISOLATION
. security-role-assignment
this way i've appended a transaction isolation section immediatly after the jndi-name section
from my weblogic-ejb-jar.xml file to specify that all methods of my container-managed ejb
should use read-committed accesses to the database. But i've gotten the error message:
org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allows no further input; "transaction-isolation" is not allowed.
during compilation time at parsing. Nowhere else in the weblogic-ejb-jar.xml i can put the
isolation transaction section without receiving some related parsing error. The same happens
trying to include such transaction section at ejb-jar.xml. I'm attaching both xml files. Should
anybody help me saying where that section should be described? And if it should be placed in
another file, why the documentation states for describing it at the weblogic-ejb-jar.xml?
[weblogic-ejb-jar.xml]That means that you do not have the SP6 in the service pack and it is using
the old DTD.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Ana Benites" <[email protected]> wrote in message
news:[email protected]...
>
Cameron,
hello.
When you say "<enterprise-bean>" block, you mean"<weblogic-enterprise-bean>"block, isn't it?
>
Because you recommend in your response exactly what i was doing in myweblogic-ejb-jar.xml,
>
that i had attached to my message when openning this discussion. I copyit again here:
>
My weblogic-ejb-jar.xml:
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
>
>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>cluster.ejb.TellerHome</ejb-name>
<caching-descriptor>
</caching-descriptor>
<enable-call-by-reference>False</enable-call-by-reference>
<jndi-name>cluster.ejb.TellerHome</jndi-name>
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
>
<method>
<ejb-name>cluster.ejb.TellerHome</ejb-name>
<method-name>*</method-name>
</method>
</transaction-isolation>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
...and this is resulting in the following parsing error during compiletime:
>
>
org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean" allowsno further input; "transaction-isolation" is not allowed.
at com.sun.xml.parser.Parser.error(Parser.java:2775)
atcom.sun.xml.parser.ValidatingParser$ChildrenValidator.consume(ValidatingPars
er.java:306)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1280)
at com.sun.xml.parser.Parser.content(Parser.java:1498)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
at com.sun.xml.parser.Parser.content(Parser.java:1498)
at com.sun.xml.parser.Parser.maybeElement(Parser.java:1399)
at com.sun.xml.parser.Parser.parseInternal(Parser.java:491)
at com.sun.xml.parser.Parser.parse(Parser.java:283)
at weblogic.xml.dom.SunDOMParser.getDocument(SunDOMParser.java:69)
at weblogic.xml.dom.DOMParser.getDocument(DOMParser.java:102)
atweblogic.ejb.deployment.dd.DescriptorLoader.<init>(DescriptorLoader.java:157
at weblogic.ejbc.runBody(ejbc.java, Compiled Code)
at weblogic.utils.compiler.Tool.run(Tool.java:80)
at weblogic.ejbc.main(ejbc.java:353)
Am i forgetting anything?
Thanks for your help
Ana.
"Cameron Purdy" <[email protected]> wrote:
Hi Ana,
Add to weblogic-ejb-jar.xml:
Inside each <enterprise-bean> block, add the following immediately before
the block closes:
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
<method>
<ejb-name></ejb-name>
<method-name>*</method-name>
</method>
</transaction-isolation>
The <ejb-name> value of the <method> block of the <transaction-isolation>
block must match the <ejb-name> value of the <enterprise-bean> block.
Please note the case sensitive nature of the values.
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Ana Benites" <[email protected]> wrote in message
news:[email protected]...
Thanks for your attention Cameron,
from my WebLogic Console one can read
"WebLogic Build 5.1.0 Service Pack 6 09/20/2000 21:03:19#84511"
...because i was suspecting the problem was due to a lack of
applying
the service pack 6. But even
after that upgrade the parsing errors remain.
regards
Ana
"Cameron Purdy" <[email protected]> wrote:
Ana,
The 5.1 release did NOT support transaction isolation in the
weblogic-ejb-jar.xml file.
That feature was introduced in a service pack. What SP are you using?
Peace,
Cameron Purdy
Tangosol, Inc.
http://www.tangosol.com
+1.617.623.5782
WebLogic Consulting Available
"Ana Benites" <[email protected]> wrote in message
news:[email protected]...
Hi,
.. from WebLogic 5.1 reference:
(...) the top level elements in weblogic-ejb-jar.xml are as follows:
description
weblogic-version
weblogic-enterprise-bean
. ejb-name
. caching-descriptor
. presistence-descriptor
. clustering-descriptor
. transaction-descriptor
. reference-descriptor
. enable-call-by-reference
. jndi-name
. TRANSACTION-ISOLATION
security-role-assignment
this way i've appended a transaction isolation section immediatly
after
the jndi-name section
from my weblogic-ejb-jar.xml file to specify that all methods of mycontainer-managed ejb
should use read-committed accesses to the database. But i've gotten
the
error message:
org.xml.sax.SAXParseException: Element "weblogic-enterprise-bean"
allows
no further input; "transaction-isolation" is not allowed.
during compilation time at parsing. Nowhere else in theweblogic-ejb-jar.xml i can put the
isolation transaction section without receiving some related parsingerror. The same happens
trying to include such transaction section at ejb-jar.xml. I'm
attaching
both xml files. Should
anybody help me saying where that section should be described? And
if
it
should be placed in
another file, why the documentation states for describing it at theweblogic-ejb-jar.xml? -
Setting dispatch-policy in weblogic-ejb-jar.xml
We are using Weblogic 8.1 sp2.
What are we trying to do-
Use the dispatch policy feature to allocate a new execute queue to a stateless session bean. This is to throttle the usage of this bean.
Problem(s) definition-
1. When I deploy the application with compiled EJBs (i.e. after running ejbc) IT WORKS.
If we deploy without compiling the EJBs IT DOES NOT WORK.
To be very sure I have already tried removing the EJBCompilerCache every time I restart the server.
I have made sure that we use the same weblogic.jar that the server uses during the compilation of the EJBs.
2. In both the cases mentioned above the weblogic-ejb-jar.xml when viewwed from the console does not show the dispatch-policy element.
Any help with regards to this would be highly appreciated.
Rgds,
AmreshWe are using Weblogic 8.1 sp2.
What are we trying to do-
Use the dispatch policy feature to allocate a new execute queue to a stateless session bean. This is to throttle the usage of this bean.
Problem(s) definition-
1. When I deploy the application with compiled EJBs (i.e. after running ejbc) IT WORKS.
If we deploy without compiling the EJBs IT DOES NOT WORK.
To be very sure I have already tried removing the EJBCompilerCache every time I restart the server.
I have made sure that we use the same weblogic.jar that the server uses during the compilation of the EJBs.
2. In both the cases mentioned above the weblogic-ejb-jar.xml when viewwed from the console does not show the dispatch-policy element.
Any help with regards to this would be highly appreciated.
Rgds,
Amresh -
Unable to deploy ejb jar consisting CMP and Stateful in single ejb-jar.xml
Hi
I was able to deploy entity bean and stateless bean saperately but when i am trying to deploy a jar consisting of CMP entity and Stateless within single ejb-jar.xml it shows following errors.
Auto-deploying ejb_SDCurrency.jar (No previous deployment found)... ISDCMCurrencyHome_EntityHomeWrapper4.java:830: 'finally'
wi
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:835: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:838: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:889: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:893: 'try' without 'catch' or 'finally'.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findByCode(int argument0, java.lang.String argument1) throws
javax.ej
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:893: Statement expected.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findByCode(int argument0, java.lang.String argument1) throws
javax.ej
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:961: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:966: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:968: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1017: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1021: 'try' without 'catch' or 'finally'.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findAllByCode(int argument0, java.lang.String argument1) throws
javax
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1021: Statement expected.
public com.satyam.icalm.staticdata.currency.ISDCMCurrency findAllByCode(int argument0, java.lang.String argument1) throws
javax
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1371: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1376: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1378: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1427: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1431: 'try' without 'catch' or 'finally'.
public java.util.Enumeration findAuthorizedRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1431: Statement expected.
public java.util.Enumeration findAuthorizedRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1496: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1501: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1504: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1555: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1559: 'try' without 'catch' or 'finally'.
public java.util.Enumeration findAllRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1559: Statement expected.
public java.util.Enumeration findAllRecords(int argument0) throws javax.ejb.FinderException, java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1624: 'finally' without 'try'.
finally
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1629: 'try' without 'catch' or 'finally'.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1632: 'catch' without 'try'.
catch(java.sql.SQLException e)
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1683: '}' expected.
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1685: 'try' without 'catch' or 'finally'.
public ISDCMCurrencyHome_EntityHomeWrapper4() throws java.rmi.RemoteException
^
ISDCMCurrencyHome_EntityHomeWrapper4.java:1685: Statement expected.
public ISDCMCurrencyHome_EntityHomeWrapper4() throws java.rmi.RemoteException
^
30 errors
Error compiling C:\oc4jext\j2ee\home\applications\calm6/ejb_SDCurrency.jar: Syntax error in source
com.evermind.compiler.CompilationException: Syntax error in source
at com.evermind.compiler.FileLinkedCompilation.run(FileLinkedCompilation.java:90)
at java.security.AccessController.doPrivileged(Native Method)
at com.evermind.compiler.FileLinkedCompiler.compile(FileLinkedCompiler.java:19)
at com.evermind.compiler.Javac.compile(Javac.java:37)
at com.evermind.server.ejb.compilation.Compilation.compileClasses(Compilation.java:335)
at com.evermind.server.ejb.compilation.Compilation.compile(Compilation.java:256)
at com.evermind.server.administration.ServerApplicationInstallation.finish(ServerApplication
Installation.java:439)
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:62)
Note:The same jar is deployed into Weblogic 5.1 and was working fine .....
so please if any solutions .....
regards,
SapHi sapthapathi,
From the information u have provided, i can only guess, that
the problem is in ur code...Not in ejb-jar.xml....
'coz there is no problem in combining stateless session bean and CMP entity bean information in a single ejb-jar.xml file...i myself have deployed bunch of CMPs with stateless session beans..
So please check ur code once again....
--Venky
Maybe you are looking for
-
Hi, When I try to build a Form & Report on a web service(XDB web service), it won't allow me to build it by throwing an error message. The error message is ORA-20001: Unable to create form on table. ORA-20001: Query must begin with SELECT or WITH The
-
Podcast Library feed address is slow connecting
Has anyone else had this problem since upgrading their server to 10.6.5? In Server admin when I click on the Podcast Library URL, it takes about 5 minutes before I can see the page. Not sure if it was this way before 10.6.5 but I have not gotten comp
-
Am I missing something? The camera appears to have no controls other than press the shutter - no exposure adjustment, no night settings, nothing. Is there a settings page somewhere? If not then this is a step back in time. I haven't owned a camera/ph
-
Copa assessment value as base for allocation of other costs
Hello, We have a scenario wherein certain costs like travel, communication should get allocated in copa based on Employee Cost... This employee cost is getting transferred to copa through assessment in two stages namely as Direct employee cost and I
-
Does Oracle 11g index Office 2007 documents?
I recently upgraded to 11g, because 10g didn't seem to index Office 2007 documents (e.g. Word, Excel, and PowerPoint) or PDFs v1.5 or higher. I need to be able to search on text in those documents. Everything works fine for PDFs and files generated u