ERROR: Error parsing 'META-INF/weblogic-ejb-jar.xml'
I have this error while compiling session bean (Stateful). my weblogic-ejb-jar.xml
file looks like this. Could anyone tell me what I'm doing wrong.
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>TransactionAgent</ejb-name>
<stateless-session-descriptor>
<pool>10</pool>
<stateless-clustering>false</stateless-clustering>
</stateless-session-descriptor>
<ejb-ref-name>ejb/Transaction</ejb-ref-name>
<jndi-name>Transaction</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
<pool> should not have any value. Instead it shud have the child nodes
<max-beans-in-free-pool> and/or <initial-beans-in-free-pool>
it will look like
<pool>
<max-beans-in-free-pool> 500 </max-beans-in-free-pool>
<initial-beans-in-free-pool>100 </initial-beans-in-free-pool>
</pool>
Also, <ejb-ref-name> and <jndi-name> goes under <ejb-reference-descriptor>
which is under <reference-descriptor>
So it would look like
<reference-descriptor>
<ejb-reference-description>
<ejb-ref-name> .. </ejb-ref-name>
<jndi-name> .. </jndi-name>
<ejb-reference-description>
</reference-descriptor>
The jndi name should also be defined for the bean. Also note that ejb-refs
are defined under a bean which is referring other beans. Like Transaction
should not refer to itself. Rather if it is referring to Customer, then
ejb-ref will be defined for CustomerBean.
Hope it helps.
Rupesh.
Owen <[email protected]> wrote in message
news:3c614fb0$[email protected]..
>
I have this error while compiling session bean (Stateful). myweblogic-ejb-jar.xml
file looks like this. Could anyone tell me what I'm doing wrong.
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>TransactionAgent</ejb-name>
<stateless-session-descriptor>
<pool>10</pool>
<stateless-clustering>false</stateless-clustering>
</stateless-session-descriptor>
<ejb-ref-name>ejb/Transaction</ejb-ref-name>
<jndi-name>Transaction</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Similar Messages
-
Error in stateless-clustering in weblogic-ejb-jar.xml
Hi,
This is my <weblogic-ejb-jar.xml> and I see an error in <stateless-bean-is-clusterable>. Can anybody please help me regarding this.
<?xml version="1.0" encoding="UTF-8"?>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/10.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>Sample1</ejb-name>
<stateless-session-descriptor>
<pool>
<initial-beans-in-free-pool>10</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
<stateless-bean-is-clusterable>TRUE</stateless-bean-is-clusterable>
</stateless-clustering>
</stateless-session-descriptor>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>Sample2</ejb-name>
<stateless-session-descriptor>
<pool>
<initial-beans-in-free-pool>10</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
<stateless-bean-is-clusterable>TRUE</stateless-bean-is-clusterable>
</stateless-clustering>
</stateless-session-descriptor>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>Sample3</ejb-name>
<stateless-session-descriptor>
<pool>
<initial-beans-in-free-pool>10</initial-beans-in-free-pool>
</pool>
<stateless-clustering>
<stateless-bean-is-clusterable>TRUE</stateless-bean-is-clusterable>
</stateless-clustering>
</stateless-session-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
I am using weblogic 10.3 and EJB 3.0 Can I include all the EJBs in a single <weblogic-ejb-jar.xml> file and can I put it in the EAR->EarContent->META-INF folder, where the application.xml and weblogic-application.xml files exist.
Basically, I am trying to include <initial-beans-in-free-pool> and <stateless-bean-is-clusterable> for each of my EJBs. Since there is no annotation equivalent for them in EJB 3.0, I had to include the <weblogic-ejb-jar.xml> file. I appreciate if anybody can suggest me if there is any annotation equivalent for these.
Thank you,
SowmyaHi,
1. please try with <stateless-bean-is-clusterable>true</stateless-bean-is-clusterable>
2. the EJB Specification requires "The deployment descriptor must be stored with the name META-INF/ejb-jar.xml in the ejb-jar file." So you shouldn't put the weblogic-ejb-jar.xml to EAR's META-INF folder.
3. <stateless-bean-is-clusterable> has a default value as "true". so you needn't specify it in your weblogic-ejb-jar.xml if you just want to have the "true" value.
4. default value of <initial-beans-in-free-pool> is 0. Since you're changing the default value, you'll have to specify it in weblogic-ejb-jar.xml. If you can put all EJBs in one ejb jar file, you can have only one weblogic-ejb-jar.xml in the META-INF folder of this ejb jar.
Thanks,
Amy -
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? -
Can't I use the comment in weblogic-ejb-jar.xml?
Hi, I am migrating to WebLogic Server 6.1 from 5.1.
And for the weblogic-ejb-jar.xml,
the following error occurs:
ERROR: Error parsing 'META-INF/weblogic-ejb-jar.xml' line 14: An invalid XML character
(Unicode: 0xb8) was found in the comment.
ERROR: ejbc found errors
The errorneous line is the following comment. (it's fine in 5.1)
<!-- if false, ... -->
Must I remove this comment?
Thanks in advance.I used Korean language in comment.
But the charset of XML was iso-8859-1.
Sorry.
"mariah" <[email protected]> wrote:
>
Hi, I am migrating to WebLogic Server 6.1 from 5.1.
And for the weblogic-ejb-jar.xml,
the following error occurs:
ERROR: Error parsing 'META-INF/weblogic-ejb-jar.xml' line 14: An invalid
XML character
(Unicode: 0xb8) was found in the comment.
ERROR: ejbc found errors
The errorneous line is the following comment. (it's fine in 5.1)
<!-- if false, ... -->
Must I remove this comment?
Thanks in advance. -
Invalid weblogic-ejb-jar.xml ??
I have a question about weblogic-ejb-jar.xml file entries.
weblogic 9.1 server says it is invalid while deploying my file
my file is as under,
<?xml version="1.0"?><!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems,
Inc.//DTD WebLogic 8.1.0 EJB//EN'
'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/910"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/910
http://www.bea.com/ns/weblogic/910/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>MessageAccess</ejb-name>
<message-driven-descriptor>
<resource-adapter-jndi-name>SystemModule-test</resource-adapter-jndi-name>
</message-driven-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
can anybody help what is wrong with it?I used Korean language in comment.
But the charset of XML was iso-8859-1.
Sorry.
"mariah" <[email protected]> wrote:
>
Hi, I am migrating to WebLogic Server 6.1 from 5.1.
And for the weblogic-ejb-jar.xml,
the following error occurs:
ERROR: Error parsing 'META-INF/weblogic-ejb-jar.xml' line 14: An invalid
XML character
(Unicode: 0xb8) was found in the comment.
ERROR: ejbc found errors
The errorneous line is the following comment. (it's fine in 5.1)
<!-- if false, ... -->
Must I remove this comment?
Thanks in advance. -
Weblogic-ejb-jar.xml ---- persistence-type
Hi all,
How does wls6.1determine the "type-identifier" (weblogic-ejb-jar.xml) of a
JDBC-Datastore? Which method will be called to get that information? My
vendor does not provide the correct type-identifier!!
I can´t believe that this is all about the weblogic-ejb-jar.xml --
type-identifier I found at
http://e-docs.bea.com/wls/docs61/////ejb/reference.html#1071588.
It writes:
"..if you use a different persistence vendor, consult the vendor's
documentation for information on the correct type-identifier."
Part of a weblogic-ejb-jar.xml:
<persistence-type>
<type-identifier>JDataStore</type-identifier>
<type-version>3.0</type-version>
<type-storage>meta-inf/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
Thanks!!!
Thomasthanks a lot!!
Rob Woollen <[email protected]> wrote:
The 7.0 DTD is not entirely upward compatible from the 6.x DTD. There
is a DDConverter tool which will convert 6.x DTDs to 7.0.
In this case, they were trying to make your life simpler by no longer
making there be so many entries just to use WebLogic's CMP implementation.
-- Rob
dayFly wrote:
thanks for your help
I have replaced the dtd with 6.0's
that is to say the 7.0 dtd is not compatible with 6.0 dtd?
I am a rookie
Rob Woollen <[email protected]> wrote:
The error message is a bit confusing. It means that persistence-type
is
not an element in the DTD.
In other words, your descriptor does not conform to the 7.0 DTD that
you
reference.
-- Rob
dayFly wrote:
when execute java weblogic.ejbc,The console show the wrong messages:
ERROR: Error from ejbc: Error parsing 'META-INF/weblogic-ejb-jar.xml'
line 12:Element type "persistence-type" must be declared
but in my weblogic-ejb-jar.xml,persistence-type had been declared.
weblogic-ejb-jar:
<?xml version="1.0"?>
"-//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>StudentEJB</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>7.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<jndi-name>StudentEJB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
waiting for your help,thanks -
Use of externally-defined/ in weblogic-ejb-jar.xml
I am trying to use Global Roles defined via the Weblogic console to control access to EJB methods.
I am using the <externally-defined/> tag in security role assignments, however when I deploy to Weblogic I get the following error :
<8/09/2004 04:21:42 PM GMT+10:00> <Error> <Deployer> <BEA-149205> <Failed to initialize the application appsdirmars-marketdata_ear due to error weblogic.manag
ement.ApplicationException: Prepare failed. Task Id = null
Module Name: ejb-marketdata.jar, Error: [EJB:011024]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:
Error parsing file 'META-INF/weblogic-ejb-jar.xml' at line: 51 column: 26. Element type "externally-defined" must be declared..
at weblogic.j2ee.J2EEApplicationContainer.checkForErrors(J2EEApplication
Container.java:1612)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:1207)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:1051)
at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContain
er.java:823)
at weblogic.management.deploy.slave.SlaveDeployer$Application.prepare(Sl
aveDeployer.java:2925)
at weblogic.management.deploy.slave.SlaveDeployer.prepareAllApplications
(SlaveDeployer.java:967)
at weblogic.management.deploy.slave.SlaveDeployer.resume(SlaveDeployer.j
ava:349)
at weblogic.management.deploy.DeploymentManagerServerLifeCycleImpl.resum
e(DeploymentManagerServerLifeCycleImpl.java:229)
at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
at weblogic.Server.main(Server.java:32)
I am running Weblogic 8.1 SP3 on Windows XP Pro.
The XML is valid for the specified DTD according to my XML editor.
The relevevant fragment from weblogic-ejb-jar.xml is included below.
Any help much appreciated.
Gavin.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<security-role-assignment>
<role-name>MarsAdmin</role-name>
<externally-defined/>
</security-role-assignment>
<security-role-assignment>
<role-name>MarsViewer</role-name>
<externally-defined/>
</security-role-assignment>
</weblogic-ejb-jar>I tried using the <global-role/> tag instead - this does deploy without any errors - but when I call the secure EJB method I get the Security Violation error below.
The DTD says using the <global-role/> tag is fine, albeit deprecated, but the Weblogic 8.1 manual says this has been replaced by <externally-defined/>, so I'm not sure if this should work or not.
[EJB:010160]Security Violation: User: 'ghughes' has insufficient permission to access EJB: type=<ejb>, application=_appsdir_mars-marketdata_ear, module=ejb-marketdata.jar, ejb=marketdata.MarketDataManager, method=getEnergyOverview, methodInterface=Remote, signature={java.util.Date}.
So on the whole I'd prefer to work out why Weblogic isn't recognising <externally-defined/> - I've included the full deployment descriptor below - I'm generating it using the latest snapshot of XDoclet - is the DTD specified correct for Weblogic 8.1 SP3 ? (It matches the one specified in http://e-docs.bea.com/wls/docs81/ejb/DDreference-ejb-jar.html - but I can't think of anything else that could be wrong).
Any tips much appreciated as I need to enable an administrator to customise these roles at runtime rather than hard-coding the role - group mappings into the deployment descriptors.
Thanks,
Gavin.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<description><![CDATA[Generated by XDoclet]]></description>
<weblogic-enterprise-bean>
<ejb-name>marketdata.MarketDataManager</ejb-name>
<stateless-session-descriptor>
</stateless-session-descriptor>
<reference-descriptor>
</reference-descriptor>
<jndi-name>marketdata.MarketDataManager</jndi-name>
<local-jndi-name>marketdata.MarketDataManagerLocal</local-jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>marketdata.MessageManager</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>5</max-beans-in-free-pool>
<initial-beans-in-free-pool>1</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>FileTopic</destination-jndi-name>
<connection-factory-jndi-name>JMSConnectionFactory</connection-factory-jndi-name>
<jms-polling-interval-seconds>10</jms-polling-interval-seconds>
<jms-client-id>1</jms-client-id>
</message-driven-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>10</trans-timeout-seconds>
</transaction-descriptor>
<reference-descriptor>
</reference-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
</weblogic-enterprise-bean>
<!--
To add enterprise beans that you have deployment descriptor info for, add
a file to your XDoclet merge directory called weblogic-enterprise-beans.xml that contains
the <weblogic-enterprise-bean></weblogic-enterprise-bean> markup for those beans.
-->
<!-- xdoclet merge file -> weblogic-ejb-jar.xml -->
<security-role-assignment>
<role-name>MarsAdmin</role-name>
<externally-defined/>
</security-role-assignment>
<security-role-assignment>
<role-name>MarsViewer</role-name>
<externally-defined/>
</security-role-assignment>
<idempotent-methods>
</idempotent-methods>
</weblogic-ejb-jar>
Message was edited by [email protected] at Sep 8, 2004 8:45 PM -
Weblogic-ejb-jar.xml tags
can anybody tell me if the jndi name tag can come before the ejbtype-descriptor tag
like instead of the usual
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MyTestSessionBean</ejb-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<jndi-name>MyTestSessionBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
can it be like
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>MyTestSessionBean</ejb-name>
<jndi-name>MyTestSessionBean</jndi-name>
<stateless-session-descriptor>
<pool>
</pool>
<stateless-clustering>
</stateless-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
</transaction-descriptor>
<jndi-name>MyTestSessionBean</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
i think it should not be a problem as long as its within the <weblogic-enterprise-bean>: i am generating DDs for weblogic and ejbs and its a big applictaion i dont know if it will work or not. thanks in advance
Message was edited by sarmahdi at Sep 3, 2004 7:45 AMit seems that unfortunately i cannot but i really appreciate your answer:
ejbname should follow descriptor then jndi name i gues as i am having errors
<!ELEMENT weblogic-enterprise-bean (
ejb-name,
(entity-descriptor|
stateless-session-descriptor|
stateful-session-descriptor|
message-driven-descriptor
transaction-descriptor?,
iiop-security-descriptor?,
reference-descriptor?,
enable-call-by-reference?,
clients-on-same-server?,
(run-as-identity-principal|
run-as-principal-name
create-as-principal-name?,
remove-as-principal-name?,
passivate-as-principal-name?,
jndi-name?,
local-jndi-name?,
dispatch-policy?)
>
i am having this error: Module: core_ejb_sb.jar Error: [EJB:011024]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:
Error parsing file 'META-INF/weblogic-ejb-jar.xml' at line: 9 column: 29. The content of element
type "weblogic-enterprise-bean" must match "
(ejb-name,
(entity-descriptor|stateless-session-descriptor|stateful-session-descriptor|message-driven-descriptor)?,
transaction-descriptor?,iiop-security-descriptor?,reference-descriptor?,enable-call-by-reference?,clients-on-same-server?,(run-as-identity-principal|
run-as-principal-name)?,create-as-principal-name?,remove-as-principal-name?,passivate-as-principal-name?,jndi-name?,local-jndi-name?,dispatch-policy?)"
i guess i have to change the format now. -
Deployment plan fails for weblogic-ejb-jar.xml
FILE FOR PLAN TO ACT ON:
application.ear\ReferenceTableSession.jar\META-INF\weblogic-ejb-jar.xml
<?xml version="1.0" encoding="utf-8"?>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/10.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>referencetablesession</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-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>150</trans-timeout-seconds>
</transaction-descriptor>
<enable-call-by-reference>true</enable-call-by-reference>
<jndi-name>XYZ_ejb/ProviderMaintSvc/referencetablesession</jndi-name>
</weblogic-enterprise-bean>
<transaction-isolation>
<isolation-level>TransactionReadCommitted</isolation-level>
<method>
<ejb-name>referencetablesession</ejb-name>
<method-name>*</method-name>
</method>
</transaction-isolation>
</weblogic-ejb-jar>
DEPLOYMENT PLAN:
<?xml version='1.0' encoding='utf-8'?>
<deployment-plan xmlns="http://www.bea.com/ns/weblogic/deployment-plan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/deployment-plan http://www.bea.com/ns/weblogic/deployment-plan/1.0/deployment-plan.xsd">
<application-name>application.ear</application-name>
<variable-definition>
<variable>
<name>VAR_referencetablesession</name>
<value>ejb/ProviderClaimOnlineSvc/referencetablesession</value>
</variable>
</variable-definition>
<module-override>
<module-name>ReferenceTableSession.jar</module-name>
<module-type>ejb</module-type>
<module-descriptor external="false">
<root-element>weblogic-ejb-jar</root-element>
<uri>META-INF/weblogic-ejb-jar.xml</uri>
<variable-assignment>
<name>VAR_referencetablesession</name>
<xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/\[ejb-name="referencetablesession"\]/jndi-name</xpath>
<operation>replace</operation>
</variable-assignment>
</module-descriptor>
</module-override>
<config-root>servers/AdminServer/upload</config-root>
</deployment-plan>
ERROR FROM CONSOLE:
Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error Exception preparing module: EJBModule(ReferenceTableSession.jar) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Unmarshaller failed.
Message icon - Error Bean already exists: "[email protected]f2(/WeblogicEnterpriseBeans[referencetablesession])"
ERROR FROM LOG:
<Oct 2, 2009 1:08:25 PM CDT> <Error> <J2EE> <BEA-160197> <Unable to load descriptor servers/ms34/tmp/_WL_user/ProviderClaimOnlineSvc/y1anoa/ReferenceTableSession.jar/META-INF/weblogic-ejb-jar.xml of module ReferenceTableSession.jar. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
at weblogic.application.descriptor.AbstractDescriptorLoader2.mergeDescriptorBeanWithPlan(AbstractDescriptorLoader2.java:703)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:776)
at weblogic.ejb.spi.EjbJarDescriptor.parseWeblogicEjbJarBean(EjbJarDescriptor.java:160)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processWLEjbJarXMLWithSchema(EjbDescriptorReaderImpl.java:719)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.parseWLDD(EjbDescriptorReaderImpl.java:541)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processWeblogicEjbJarXML(EjbDescriptorReaderImpl.java:380)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:191)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1198)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)
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)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(RedeployOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:122)
Thanks,
Rob
Edited by: user11337024 on Oct 5, 2009 2:31 PMFILE FOR PLAN TO ACT ON:
application.ear\ReferenceTableSession.jar\META-INF\weblogic-ejb-jar.xml
<?xml version="1.0" encoding="utf-8"?>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/10.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/10.0 http://www.bea.com/ns/weblogic/10.0/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>referencetablesession</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-clustering>
</stateless-session-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>150</trans-timeout-seconds>
</transaction-descriptor>
<enable-call-by-reference>true</enable-call-by-reference>
<jndi-name>XYZ_ejb/ProviderMaintSvc/referencetablesession</jndi-name>
</weblogic-enterprise-bean>
<transaction-isolation>
<isolation-level>TransactionReadCommitted</isolation-level>
<method>
<ejb-name>referencetablesession</ejb-name>
<method-name>*</method-name>
</method>
</transaction-isolation>
</weblogic-ejb-jar>
DEPLOYMENT PLAN:
<?xml version='1.0' encoding='utf-8'?>
<deployment-plan xmlns="http://www.bea.com/ns/weblogic/deployment-plan"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/deployment-plan http://www.bea.com/ns/weblogic/deployment-plan/1.0/deployment-plan.xsd">
<application-name>application.ear</application-name>
<variable-definition>
<variable>
<name>VAR_referencetablesession</name>
<value>ejb/ProviderClaimOnlineSvc/referencetablesession</value>
</variable>
</variable-definition>
<module-override>
<module-name>ReferenceTableSession.jar</module-name>
<module-type>ejb</module-type>
<module-descriptor external="false">
<root-element>weblogic-ejb-jar</root-element>
<uri>META-INF/weblogic-ejb-jar.xml</uri>
<variable-assignment>
<name>VAR_referencetablesession</name>
<xpath>/weblogic-ejb-jar/weblogic-enterprise-bean/\[ejb-name="referencetablesession"\]/jndi-name</xpath>
<operation>replace</operation>
</variable-assignment>
</module-descriptor>
</module-override>
<config-root>servers/AdminServer/upload</config-root>
</deployment-plan>
ERROR FROM CONSOLE:
Message icon - Error An error occurred during activation of changes, please see the log for details.
Message icon - Error Exception preparing module: EJBModule(ReferenceTableSession.jar) [EJB:011023]An error occurred while reading the deployment descriptor. The error was: Unmarshaller failed.
Message icon - Error Bean already exists: "[email protected]f2(/WeblogicEnterpriseBeans[referencetablesession])"
ERROR FROM LOG:
<Oct 2, 2009 1:08:25 PM CDT> <Error> <J2EE> <BEA-160197> <Unable to load descriptor servers/ms34/tmp/_WL_user/ProviderClaimOnlineSvc/y1anoa/ReferenceTableSession.jar/META-INF/weblogic-ejb-jar.xml of module ReferenceTableSession.jar. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
at weblogic.application.descriptor.AbstractDescriptorLoader2.mergeDescriptorBeanWithPlan(AbstractDescriptorLoader2.java:703)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBean(AbstractDescriptorLoader2.java:776)
at weblogic.ejb.spi.EjbJarDescriptor.parseWeblogicEjbJarBean(EjbJarDescriptor.java:160)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processWLEjbJarXMLWithSchema(EjbDescriptorReaderImpl.java:719)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.parseWLDD(EjbDescriptorReaderImpl.java:541)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processWeblogicEjbJarXML(EjbDescriptorReaderImpl.java:380)
at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:191)
at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1198)
at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)
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)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
at weblogic.deploy.internal.targetserver.operations.RedeployOperation.createAndPrepareContainer(RedeployOperation.java:98)
at weblogic.deploy.internal.targetserver.operations.RedeployOperation.doPrepare(RedeployOperation.java:122)
Thanks,
Rob
Edited by: user11337024 on Oct 5, 2009 2:31 PM -
Deployment Plan / weblogic-ejb-jar.xml: Problem
Hello,
I am trying to use a deployment plan to override the principal name in the weblogic-ejb-jar.xml.
The deployment-plan looks like this (showing only the important sections)
<variable-definition>
<variable>
<name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
<value>MY PRINCIPAL 1</value>
</variable>
</variable-definition>
<variable-assignment>
<name>SecurityRoleAssignment_ejbRole_PrincipalNames_1</name>
<xpath>/weblogic-ejb-jar/security-role-assignment/[role-name="View-Role"]/externally-defined</xpath>
<operation>replace</operation>
</variable-assignment>
The security-role assignment in the weblogic-ejb-jar.xml looks like this:
<security-role-assignment>
<role-name>View-Role</role-name>
<externally-defined/>
</security-role-assignment>
I 've tried to override the element-value of <externally-defined> (a valid tag in the weblogic-ejb-jar.xml ) with help of a deployment-plan.
When trying to deploy my application (which is organised in the directory-structure: inst_dir/APP inst_dir/PLAN
the following error occurs:
VALIDATION PROBLEMS WERE FOUND problem: cvc-complex-type.2.4a: Expected element 'principal-name@http://www.bea.com/ns/weblogic/10.0' instead of 'externally-defined@http://www.bea.com/ns/weblogic/10.0' here in element security-role-assignment@http://www.bea.com/ns/weblogic/10.0:
This has surprised me, as externally-defined is (according to the documentation) a valid tag.
I have tried to replace <externally-defined> with an empty <principal-name> tag (which works fine when deploying the application), but causes a security exception, when trying to use the EJB.
Has anybody an idea if there is a workaround for this problem?
IMHO the Validatio Problem is not justified at this place then why should an otherwise valid weblogic-ejb-jar.xml (when not using a deployment-plan) suddenly become invalid when a deployment plan is used?
Thanx a lot in advance!
Edited by: user10672779 on 02.12.2008 04:09Hi again,
I tried it with the weblogic 10 Namespace Declaration but got then this error:
failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
and following Exception:
<02.12.2008 20.00 Uhr CET> <Error> <J2EE> <BEA-160197> <Unable to load descriptor D:\exportapps\tb.ear\app\tb_flowcontrol.jar/META-INF/weblogic-ejb-jar.xml of module tb_flowcontrol.jar. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:152)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:292)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:260)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:774)
at weblogic.application.descriptor.AbstractDescriptorLoader2.createDescriptorBean(AbstractDescriptorLoader2.java:395)
at weblogic.application.descriptor.AbstractDescriptorLoader2.loadDescriptorBeanWithoutPlan(AbstractDescriptorLoader2.java:745)
Caused by: com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:329)
at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:296)
at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:306)
at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:287)
at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:141)
Searching the net couldn't supply me with another answer as to use the 90 Namespace Declaration again...
I think I forgot to mention I am using an exploded directory.
This all seems very strange.
cheers. -
Storing ejb-jar.xml and weblogic-ejb-jar.xml
We are using Weblogic Integration 9.2 on a 2 cluster system sharing the same domain directory.
1) I am wondering if I can store these files somewhere in the domains directory instead of the EJB's archive - call it MyEjb.jar?
2) Are there any benefits to storing these files outside of the MyEjb.jar file? I am thinking to make it easier to update the configurations such as number of MDB consumers and such to avoid having to recreate the MyEjb.jar with the new config and redeploy the application. A simple text edit and bounce could be fine if the files can be stored outside.
2b) Can another application in the same domain read these files to find out the connection factory and queue information?
3) Are there any disadvantages to storing those files outside of the jar file? One issue I can think of here is how to deal with them on a cluster environment.
4) Any other feedback apprecaited.If you look at the contents of a deployment plan (Plan.xml) when you have it generated
<deployment-plan ...>
<module-override>
<module-name>ejb.jar</module-name>
<module-type>ejb</module-type>
<module-descriptor external="true">
<root-element>weblogic-ejb-jar</root-element>
<uri>META-INF/weblogic-ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>ejb-jar</root-element>
<uri>META-INF/ejb-jar.xml</uri>
</module-descriptor>
<module-descriptor external="true">
<root-element>persistence-configuration</root-element>
<uri>META-INF/persistence-configuration.xml</uri>
</module-descriptor>
<module-descriptor external="false">
<root-element>persistence</root-element>
<uri>META-INF/persistence.xml</uri>
</module-descriptor>
</module-override>
</deployment-plan>You can see which files can be external and which can be not. The weblogic-ejb-jar.xml can be external
but in this case you need a deployment plan to point weblogic to the file. The ejb-jar.xml cannot be
external (see external=false)
The benefit of storing the weblogic-ejb-jar.xml is that your administrator can fine tune certain
configurations by using a deployment plan, instead of having to extract the contents from the jar file
and then repackage it again.
No need to worry about a clustered environment, you can place the jar and the deployment plan
on the server where the admin server is located, when you deploy an application you deploy it to
the cluster and everything is taken care off.
More information on deployment plans can be found here: http://download.oracle.com/docs/cd/E11035_01/wls100/deployment/config.html -
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 while reading 'META-INF/weblogic-cmp-rdbms-jar.xml
Hi,
I am getting an error running appc. I am upgrading from wl 7 to wl 8.1. ejbc works
fine on wl 7. Anyone seen this before?
[J2EE:160121]Errors encountered while compiling module 'e:\dev\xstatic\tmp\xstatic_Intermediate.jar':
[EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error
was:
java.lang.NullPointerException
at weblogic.ejb20.cmp.rdbms.finders.ExprWHERE.init_method()V(ExprWHERE.java:47)
at weblogic.ejb20.cmp.rdbms.finders.BaseExpr.init(Lweblogic.ejb20.cmp.rdbms.finders.QueryContext;Lweblogic.ejb20.cmp.rdbms.finders.QueryNode;)V(BaseExpr.java:230)
at weblogic.ejb20.cmp.rdbms.finders.ExprROOT.init_method()V(ExprROOT.java:89)
at weblogic.ejb20.cmp.rdbms.finders.BaseExpr.init(Lweblogic.ejb20.cmp.rdbms.finders.QueryContext;Lweblogic.ejb20.cmp.rdbms.finders.QueryNode;)V(BaseExpr.java:230)
at weblogic.ejb20.cmp.rdbms.finders.QueryContext.generateQuery()V(QueryContext.java:91)
at weblogic.ejb20.cmp.rdbms.finders.Finder.computeSQLQuery(Lweblogic.ejb20.cmp.rdbms.RDBMSBean;)V(Finder.java:1002)
at weblogic.ejb20.cmp.rdbms.RDBMSBean.generateFinderSQLStatements(Ljava.util.Iterator;)V(RDBMSBean.java:2692)
at weblogic.ejb20.cmp.rdbms.Deployer.readTypeSpecificData(Ljava.io.InputStream;Ljava.lang.String;)V(Deployer.java:479)
at weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(Lweblogic.ejb20.interfaces.EntityBeanInfo;Lweblogic.ejb20.persistence.spi.CMPDeployer;)V(PersistenceType.java:483)
at weblogic.ejb20.persistence.PersistenceType.setupDeployer(Lweblogic.ejb20.interfaces.EntityBeanInfo;Ljava.io.File;Lweblogic.utils.Getopt2;Lweblogic.utils.jars.VirtualJarFile;)Lweblogic.ejb20.persistence.spi.CMPDeployer;(PersistenceType.java:414)
at weblogic.ejb20.deployer.CMPInfoImpl.setup(Ljava.io.File;Lweblogic.utils.Getopt2;Lweblogic.utils.jars.VirtualJarFile;)V(CMPInfoImpl.java:113)
at weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(Lweblogic.ejb20.interfaces.EntityBeanInfo;Lweblogic.utils.jars.VirtualJarFile;)Ljava.util.List;(EJB20CMPCompiler.java:64)
at weblogic.ejb20.ejbc.EJBCompiler.doCompile(Ljava.util.Collection;Lweblogic.utils.jars.VirtualJarFile;)V(EJBCompiler.java:245)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.management.configuration.EJBComponentMBean;Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Lweblogic.utils.jars.VirtualJarFile;Lweblogic.j2ee.valid
ation.ModuleValidationInfo;Lweblogic.ejb20.ejbc.VersionHelper;Ljava.util.Collection;)V(EJBCompiler.java:468)
at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.utils.jars.VirtualJarFile;Lweblogic.j2ee.validation.ModuleValidationInfo;)V(EJBCompiler.java:387)
at weblogic.appc.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.utils.jars.VirtualJarFile;Ljava.io.File;Lweblogic.j2ee.validation.ModuleValidationInfo;)V(appc.java:735)
at weblogic.appc.compileEJB()V(appc.java:709)
at weblogic.appc.compileInput()V(appc.java:446)
at weblogic.appc.runBody()V(appc.java:167)
at weblogic.utils.compiler.Tool.run([Ljava.lang.String;)V(Tool.java:146)
at weblogic.utils.compiler.Tool.run()V(Tool.java:103)
at weblogic.appc.main([Ljava.lang.String;)V(appc.java:961)
It is a bug for the EJB container to respond with an NPE.
(It's been fixed in v9 Beta, and it might be fixed in an 8.1 service pack but I can't recall off the top of my head). At any rate, I'm pretty sure that an EJB QL query with an empty WHERE clause will cause this. I would look for a query that ends in ' WHERE'.
-thorick -
"Could not locate the bean with the ejb-name XYZ in weblogic-ejb-jar.xml
Hi,
Please someone help me on this...
I'm trying to deploy an application on WLS 8.1 SP4
on HPUX IA64 arch. From the ear file WLS is able to
deploy 3 jars but for the last two jars it's throwing
the below error:
Could not locate the bean with the ejb-name xyz in weblogic-ejb-jar.xml
But ejb with name xyz is defined in the the weblogic-ejb-jar.xml file and it's also present in the
META-INF/ejb-jar.xml file.
I have no clue what's going wrong.
Any help is appreciated.
Thanks
Moulioops! Pls ignore my previous mail. It was for a different problem.
FOr the original problem of "couldn ot locate the bean with the ejb-name XZY in weblogic-ejb-jar.xml":
This happens if you don't have the below files defined
for a JAR/EAR file:
weblogic-ejb-jar.xml and weblogic-cmp-rdbms-jar.xml (needed if you have any Datasource mapped)
These two are basic files required for any JAR/EAR file.
If you dont' have it already you can generate them using
$WLS_HOME/bin/startWLBuilder.sh GUI tool bundled along
with WLS (I used 8.1 SP4) to generate these files ! This tool is really helpful.
- Mouli -
Failed to load weblogic-ejb-jar.xml
Hi,
I try to deploy an EJB on Weblogic 9.1, but the weblogic-ejb-jar seems to cause this exception :
======================================================
[wlappc] <30 oct. 2006 12 h 13 CET> <Error> <J2EE> <BEA-160187> <weblogic.appc failed to compile your application. Recompile with the -verbose option for more details. Please see the error message(s) below.>
[wlappc] com.bea.xml.XmlException: failed to load java type corresponding to e=weblogic-ejb-jar@http://www.bea.com/ns/weblogic/910
[wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.getPojoBindingType(UnmarshalResult.java:325)
[wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:292)
[wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineTypeForGlobalElement(UnmarshalResult.java:302)
[wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.determineRootType(UnmarshalResult.java:283)
[wlappc] at com.bea.staxb.runtime.internal.UnmarshalResult.unmarshalDocument(UnmarshalResult.java:153)
[wlappc] at com.bea.staxb.runtime.internal.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:65)
[wlappc] at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:138)
[wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:271)
[wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:240)
[wlappc] at weblogic.descriptor.DescriptorManager.createDescriptor(DescriptorManager.java:300)
[wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:344)
[wlappc] at weblogic.application.descriptor.CachingDescriptorLoader.createDescriptor(CachingDescriptorLoader.java:188)
[wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.createDescriptor(AbstractDescriptorLoader.java:328)
[wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.getDescriptor(AbstractDescriptorLoader.java:237)
[wlappc] at weblogic.application.descriptor.AbstractDescriptorLoader.getRootDescriptorBean(AbstractDescriptorLoader.java:217)
[wlappc] at weblogic.ejb.spi.EjbJarDescriptor.parseWeblogicEjbJarBean(EjbJarDescriptor.java:171)
[wlappc] at weblogic.ejb.container.dd.xml.DDUtils.processWLEjbJarXMLWithSchema(DDUtils.java:706)
[wlappc] at weblogic.ejb.container.dd.xml.DDUtils.parseWLDD(DDUtils.java:535)
[wlappc] at weblogic.ejb.container.dd.xml.DDUtils.createDescriptorFromJarFile(DDUtils.java:358)
[wlappc] at weblogic.ejb.container.dd.xml.DDUtils.createReadOnlyDescriptorFromJarFile(DDUtils.java:141)
[wlappc] at weblogic.ejb.container.ejbc.EJBCompiler.parseDescriptors(EJBCompiler.java:1345)
[wlappc] at weblogic.ejb.container.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:431)
[wlappc] at weblogic.application.compiler.AppcUtils.compileEJB(AppcUtils.java:292)
[wlappc] at weblogic.application.compiler.EJBCompiler.compile(EJBCompiler.java:95)
[wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compileInput(AppCompilerFlow.java:113)
[wlappc] at weblogic.application.compiler.flow.AppCompilerFlow.compile(AppCompilerFlow.java:43)
[wlappc] at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:55)
[wlappc] at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
[wlappc] at weblogic.application.compiler.FlowDriver.run(FlowDriver.java:24)
[wlappc] at weblogic.application.compiler.Appc.runBody(Appc.java:151)
[wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:158)
[wlappc] at weblogic.utils.compiler.Tool.run(Tool.java:115)
======================================================
Here is my weblogic-ejb-jar.xml file :
======================================================
<?xml version="1.0" encoding="ISO-8859-1"?>
<weblogic-ejb-jar xmlns="http://www.bea.com/ns/weblogic/910"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.bea.com/ns/weblogic/910
http://www.bea.com/ns/weblogic/910/weblogic-ejb-jar.xsd">
<weblogic-enterprise-bean>
<ejb-name>MyMDB</ejb-name>
<message-driven-descriptor>
<resource-adapter-jndi-name>ActiveMQRA</resource-adapter-jndi-name>
<connection-factory-jndi-name>myQCF</connection-factory-jndi-name>
</message-driven-descriptor>
<resource-description>
<res-ref-name>jms/factory</res-ref-name>
<jndi-name>myQCF</jndi-name>
</resource-description>
<resource-env-description>
<resource-env-ref-name>jms/queue</resource-env-ref-name>
<jndi-name>queue.out</jndi-name>
</resource-env-description>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
======================================================
So, it looks like this problem : http://forums.bea.com/bea/message.jspa?messageID=600018030&tstart=0
I just need a confirmation :
- is the "res-ref-name" format incorrect with '/' character ?
- is the jndi-name format incorrect with '.' character ?
Else, what is the problem with this DD ?
Thanks,
Rudy"shubha" <[email protected]> wrote:
>
hi ,
Ejb with ejb-name 'hellobean' in ejb-jar.xml
should be specified in weblogic-ejb-jar.xml with <weblogic-enterprise-bean></weblogic-enterprise-bean>
i am having problem in deploying the most simple bean on wls7.0 .
when i try to open the bean module with the weblogic builder i get the
following
message
weblogic.ejb20.WLDeploymentException: Could not locate bean with ejb-name
'hellobean'
in weblogic-ejb-jar.xml
at weblogic.ejb20.deployer.CompositeMBeanDescriptor.initialize60(CompositeMBeanDescriptor.java:249)
at weblogic.ejb20.deployer.CompositeMBeanDescriptor.init(CompositeMBeanDescriptor.java:180)
at weblogic.ejb20.deployer.CompositeMBeanDescriptor.<init>(CompositeMBeanDescriptor.java:171)
at weblogic.marathon.model.EJBJarCMBean.setup(EJBJarCMBean.java:408)
at weblogic.marathon.tasks.OpenModuleTask.figureOutModule(OpenModuleTask.java:76)
at weblogic.marathon.tasks.OpenModuleTask.figureOutModule(OpenModuleTask.java:109)
at weblogic.marathon.tasks.OpenModuleTask.runBackground(OpenModuleTask.java:64)
at weblogic.jellybeans.core.task.TaskThread.execute(TaskThread.java:114)
at weblogic.jellybeans.core.task.TaskThread.run(TaskThread.java:55)
Could not locate bean with ejb-name 'hellobean' in weblogic-ejb-jar.xml
Module hello1 descriptors failed to load
if anyone has come across the same problem and have debugged it please
help me
out
thanks in advance
Maybe you are looking for
-
I have a problem playing Farmville. I can load the game. No problem. Except I am missing my tree orchards. All I can see is dark green circles shown on the page where the orchards are. This happens on the English farm. On my other Farmville Home game
-
Facing problem to Checkin and checkout file from starteam using vba
Hi, Im trying to checkin and checkout file in starteam through vba. I have imported the StarTeamSDK104.dll in reference in vba project and tried to accomplish my task. I am able to locate the file, but not able to checkout/checkin the file. I am not
-
Can i embed openfile dialogbox in flex stage? (dont want to open it separatly)
i want fileopen dialogbox (myFileReference.browse(allTypes); ) embedded i flex app , so that i may be able to browse files without opening and closing file open dialogbox again and again. any idea?
-
Hello. On JD Edwards Best Practice Center http://www.oracle.com/technetwork/middleware/fmw4apps/jde/index.html I hit link for "BUSINESS SERVICES : Migrating from Web Services Gateway to Business Services " but it does not bring up the pdf ( http://ww
-
Is an "active grab" possible in Swing?
I would like to be able to perform an active grab in order to emulate some behavior that other windows apps have; for example, if a popup is showing in a native windows app and I click on another window, the popup is hidden. In a Swing app, if a popu