Download locally weblogic-ejb-jar.dtd
Hi,
Can we download weblogic-ejb-jar.dtd, weblogic-rdbms-persistence.dtd, weblogic-web-jar.dtd
locally and refer to those dtds instead of http://www.bea.com/...
and ship with our products? Because we don't want the end user to have internet
connection while deploying.
Is this legally allowed?
Sambath.
I have no idea, but ... all the WLS tools will resolve the weblogic
DTDs locally. They won't open a socket to bea.com. (If they do, it's a
bug.)
-- Rob
sambath wrote:
Hi,
Can we download weblogic-ejb-jar.dtd, weblogic-rdbms-persistence.dtd, weblogic-web-jar.dtd
locally and refer to those dtds instead of http://www.bea.com/...
and ship with our products? Because we don't want the end user to have internet
connection while deploying.
Is this legally allowed?
Sambath.
Similar Messages
-
DTD Doctype for weblogic-ejb-jar.xml
Hi,
I have a small question about XML DOCTYPE DEFINITION used with XML descriptors.
What should be the DOCTYPE HEADER for weblogic 6.0 sp2 & EJB 1.1?
Currently, i'm using :
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems,
Inc.//DTD WebLogic 5.1.0 EJB//EN''http://www.bea.com/servers/wls510/ dtd/weblogic-ejb-jar.dtd'>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
These are working fine. But my question is, why should we use DTDs of WLS5.1 even
if we are using WL6.0?
Note that we intend to use EJB1.1 specification.
Regards,
AmitThere is a new 6.0 DTD for CMP 1.1 entity beans to take advantage of new
features (such as 2pc). Search the CMP EJB newsgroup for a post from me
about 1 or 2 months ago summarizing the topic.
Otherwise the old DTDs seem to work just fine.
Peace,
Cameron Purdy
Tangosol Inc.
<< Tangosol Server: How Weblogic applications are customized >>
<< Download now from http://www.tangosol.com/download.jsp >>
"Amit Vaidya" <[email protected]> wrote in message
news:[email protected]..
>
Hi,
I have a small question about XML DOCTYPE DEFINITION used with XMLdescriptors.
>
What should be the DOCTYPE HEADER for weblogic 6.0 sp2 & EJB 1.1?
Currently, i'm using :
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems,
Inc.//DTD WebLogic 5.1.0 EJB//EN''http://www.bea.com/servers/wls510/
dtd/weblogic-ejb-jar.dtd'>
>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD EnterpriseJavaBeans
1.1//EN' 'http://java.sun.com/j2ee/dtds/ejb-jar_1_1.dtd'>
These are working fine. But my question is, why should we use DTDs ofWLS5.1 even
if we are using WL6.0?
Note that we intend to use EJB1.1 specification.
Regards,
Amit -
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 -
Hi
The code is as follows:
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN" "http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd">
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>CustomerController</ejb-name>
<stateful-session-descriptor>
</stateful-session-descriptor>
<local-jndi-name>CustomerJNDI</local-jndi-name>
<ejb-name>TransactionController</ejb-name>
<stateful-session-descriptor>
</stateful-session-descriptor>
<local-jndi-name>TransactionJNDI</local-jndi-name>
<ejb-name>PayeeController</ejb-name>
<stateful-session-descriptor>
</stateful-session-descriptor>
<local-jndi-name>PayeeJNDI</local-jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>I got the following error:
ERROR: Error from ejbc: Error parsing file 'META-INF/weblogic-ejb-jar.xml' at line: 17 column: 28. The content of element type "weblogic-enterprise-bean" must match "(ejb-name,(entity-descriptor|stateless-session-descriptor|stateful-sessio
n-descriptor|message-driven-descriptor)?,transaction-descriptor?,iiop-security-d
escriptor?,reference-descriptor?,enable-call-by-reference?,clients-on-same-serve
r?,run-as-identity-principal?,jndi-name?,local-jndi-name?,dispatch-policy?)".
Please give urgent solution to it.
Thanksweblogic-ejb-jar.xml jndi-name (instead of local-jndi-name) is with JDeveloper version 10.1.2 & 10.1.3
-
i am getting a classcast exception.My Stateless and stateful session bean works
fine .. problem only with Entity bean. Please check these xml files and let me
know if i have missed anything.
ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans
2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>stores</ejb-name>
<home>Ejb.Stores.storesHome</home>
<remote>Ejb.Stores.storesRemote</remote>
<ejb-class>Ejb.Stores.storesBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>storesBean</abstract-schema-name>
<cmp-field>
<field-name>productId</field-name>
</cmp-field>
<cmp-field>
<field-name>descrip</field-name>
</cmp-field>
<cmp-field>
<field-name>price</field-name>
</cmp-field>
<primkey-field>productId</primkey-field>
<query>
<query-method>
<method-name>findPriceGreaterThan</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM storesBean AS a WHERE a.price > ?1]]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>stores</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
------------- end of ejb-ar.xml---------------------
weblogic-jar.xml
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB//EN"
"http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>stores</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<jndi-name>storesEntity</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
------------- end of weblogic-jar.xml----------
weblogic-cmp-rdbms-jar.xml
<!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0
EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>
<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<ejb-name>stores</ejb-name>
<data-source-name>sqlTX</data-source-name>
<table-name>ProductEJBTable</table-name>
<field-map>
<cmp-field>productId</cmp-field>
<dbms-column>productId</dbms-column>
</field-map>
<field-map>
<cmp-field>descrip</cmp-field>
<dbms-column>descrip</dbms-column>
</field-map>
<field-map>
<cmp-field>price</cmp-field>
<dbms-column>price</dbms-column>
</field-map>
</weblogic-rdbms-bean>
<create-default-dbms-tables>false</create-default-dbms-tables>
</weblogic-rdbms-jar>
---------------- end of weblogic-cmp-rdbms-jar.xml----------
Do i have to mention the connection Pool name anywhere .. My connection Pool name
is sql7Pool and my datasource name which i have mentioned is sqlTx. I am using
Sql server 7. I am deploying a jar file(not a war file) and accessng the EJB through
a Servlet. Please any help would definitely be appreciated.
Cheers
Ashish.I thought you were getting a class cast exception but the stack trace shows
a NullPointerException on line 38 of your servlet code. I am not sure if the
code that you have attached is the complete code or just snippets of your
complete code. Anyways, counting 38 lines in the code you attached points to
the line "mr =
mh.create(request.getParameter("login"),request.getParameter("name"));"
which could be because "mh" is null. Can you verify "mh" is not null and
also "objRef" is not null.
Attaching the stack trace for ClassCastException would be useful.
-- Anand
"Ashish Suvarna" <[email protected]> wrote in message
news:[email protected]...
>
Hey Anand,
Thanks for your reply. I have attached the StackTrace,Servlet code andmy
location and settings of my servlet .
This is the StackTrace which i get :
pl.java:265)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2495)
atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
before create
java.lang.NullPointerException
at trialweblogic.webServlet.doGet(webServlet.java:38)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:265)
atweblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
atweblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2495)
atweblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
-------------- end of StackTrace---------------------
My Servlet Code is
package trialweblogic;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
import java.sql.*;
import javax.naming.InitialContext;
import javax.rmi.PortableRemoteObject;
import javax.ejb.ObjectNotFoundException;
import javax.ejb.DuplicateKeyException;
import javax.ejb.EJBException;
import java.rmi.RemoteException;
import java.rmi.Remote;
import trialweblogic.*;
public class webServlet extends HttpServlet {
masterHome mh;
masterRemote mr;
OutputStream out;
private static final String CONTENT_TYPE = "text/html";
public void init(ServletConfig config) throws ServletException {
super.init(config);
public void doGet(HttpServletRequest request, HttpServletResponseresponse)
throws ServletException, IOException {
response.setContentType(CONTENT_TYPE);
PrintWriter out = response.getWriter();
// out = response.getOutputStream();
try{
InitialContext ic = new InitialContext();
Object objRef = ic.lookup("masterBeanJNDI");
mh =(masterHome)PortableRemoteObject.narrow(objRef,masterHome.class);
>
mr =mh.create(request.getParameter("login"),request.getParameter("name"));
out.println("after create");
}catch(Exception ex){
ex.printStackTrace();
public void destroy() {
--------- end of servlet--------------
I am using Weblogic 6.1. I have included the following in my web.xml filewhich
is located atC:\bea\wlserver6.1\config\examples\applications\examplesWebApp\WEB-INF
>
>
<servlet>
<servlet-name>webServlet</servlet-name>
<servlet-class>trialweblogic.webServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>webServlet</servlet-name>
<url-pattern>/webServlet/*</url-pattern>
</servlet-mapping>
My Servlet is located atC:\bea\wlserver6.1\config\examples\applications\examplesWebApp\WEB-INF\class
es\trialweblogic\
folder. In this folder i also have the supporting files (home,remote &bean tooo).
>
>
I call this servlet when te user submits the info from a JSP page.
Hope this info helps in solving my problem. Do i have to mention theconnection
Pool name anywhere in the xml descriptor or am i missing anything here. iguess
Connection Pool name is not required since we are mentioning the JNDI namein
the xml descriptor. Bye for now.Awaiting your reply.
Cheers
Ashish.
"Anand Byrappagari" <[email protected]> wrote:
It is unlikely that your xml descriptors can cause class cast exceptions.
How did you install the servlet? Can you attach the servlet code that
might
help. Also complete stack trace of the exceptions would be helpful.
-- Anand
"Ashish Suvarna" <[email protected]> wrote in message
news:[email protected]...
Hi Anand,
Thanks for quic reply.Hey i am using weblogic6.1. I am Not usinga WAR
and
ear file.I have created a jar file and deployed it.now i have createda
servlet
to access entity bean.Is a war file neccessary for accesing an entitybean
through
Servlet or JSP ???I am using sql server 7. The error that it givesis -----
java.lang.ClassCastException: Cannot narrow remote object<br>
"inside lookup method aaaaaaa" java.lang.NullPointerException. <br>
Hope to get ur reply soon. in another entity bean i am getting thiserror ---
java.lang.ClassCastException:
weblogic.jdbc.common.internal.RmiDataSource
.. I
can't understand wots this error. I feel i am missing something inmy xml
descriptor.
Bye for now.
Cheers
Ashish.
"Anand Byrappagari" <[email protected]> wrote:
Can you attach the stack trace for the exception? Also please describe
you
environment - are the war and jar files installed separately? Are
they
composed into a ear? Also when are you getting a classcast exception?
-- Anand
"Ashish Suvarna" <[email protected]> wrote in message
news:[email protected]...
i am getting a classcast exception.My Stateless and stateful sessionbean
works
fine .. problem only with Entity bean. Please check these xml filesand
let me
know if i have missed anything.
ejb-jar.xml
<?xml version="1.0"?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD EnterpriseJavaBeans
2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>stores</ejb-name>
<home>Ejb.Stores.storesHome</home>
<remote>Ejb.Stores.storesRemote</remote>
<ejb-class>Ejb.Stores.storesBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-version>2.x</cmp-version>
<abstract-schema-name>storesBean</abstract-schema-name>
<cmp-field>
<field-name>productId</field-name>
</cmp-field>
<cmp-field>
<field-name>descrip</field-name>
</cmp-field>
<cmp-field>
<field-name>price</field-name>
</cmp-field>
<primkey-field>productId</primkey-field>
<query>
<query-method>
<method-name>findPriceGreaterThan</method-name>
<method-params>
<method-param>double</method-param>
</method-params>
</query-method>
<ejb-ql>
<![CDATA[SELECT OBJECT(a) FROM storesBean AS a WHERE
a.price> >> >>> >> >?1]>
</ejb-ql>
</query>
</entity>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>stores</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
------------- end of ejb-ar.xml---------------------
weblogic-jar.xml
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD
WebLogic
6.0.0 EJB//EN"
"http://www.bea.com/servers/wls600/dtd/weblogic-ejb-jar.dtd" >
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>stores</ejb-name>
<entity-descriptor>
<persistence>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
<type-storage>META-INF/weblogic-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>6.0</type-version>
</persistence-use>
</persistence>
</entity-descriptor>
<jndi-name>storesEntity</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
------------- end of weblogic-jar.xml----------
weblogic-cmp-rdbms-jar.xml
<!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD
WebLogic
6.0.0
EJB RDBMS Persistence//EN'
'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dt
d
<weblogic-rdbms-jar>
<weblogic-rdbms-bean>
<ejb-name>stores</ejb-name>
<data-source-name>sqlTX</data-source-name>
<table-name>ProductEJBTable</table-name>
<field-map>
<cmp-field>productId</cmp-field>
<dbms-column>productId</dbms-column>
</field-map>
<field-map>
<cmp-field>descrip</cmp-field>
<dbms-column>descrip</dbms-column>
</field-map>
<field-map>
<cmp-field>price</cmp-field>
<dbms-column>price</dbms-column>
</field-map>
</weblogic-rdbms-bean>
<create-default-dbms-tables>false</create-default-dbms-tables>
</weblogic-rdbms-jar>
---------------- end of weblogic-cmp-rdbms-jar.xml----------
Do i have to mention the connection Pool name anywhere .. My
connection
Pool name
is sql7Pool and my datasource name which i have mentioned is sqlTx.I am
using
Sql server 7. I am deploying a jar file(not a war file) and accessngthe
EJB through
a Servlet. Please any help would definitely be appreciated.
Cheers
Ashish. -
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? -
Error parsing weblogic-ejb-jar. HELP please :(
When I have added the transaction-descriptor into weblogic-ejb-jar.xml I start getting next error:
[java] ERROR: Error parsing 'META-INF/weblogic-ejb-jar.xml' line 18: The content of element type "weblogic-enterprise-bean" must match "(ejb-name,caching-descriptor?,persistence-descriptor?,clustering-descriptor?,transaction-descriptor?,reference-descriptor?,enable-call-by-reference?,jndi-name?,transaction-isolation*)".
The weblogic-ejb.jar.xml is the next:
<?xml version="1.0"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>statelessSession</ejb-name>
<caching-descriptor>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<idle-timeout-seconds>1200</idle-timeout-seconds>
</caching-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>50</trans-timeout-seconds>
</transaction-descriptor>
<jndi-name>statelessSession.EcasServicesHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
Please tell me what did I do wrong and how to fix the problem.
Thnx.
VG.I suspect you are using a version of WebLogic higher than 5.1. Coz, your XML is invalid if I use the following DOCTYPE.
<!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">
You can try this
<?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>
<weblogic-enterprise-bean>
<ejb-name>statelessSession</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>20</initial-beans-in-free-pool>
</pool>
</stateless-session-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>50</trans-timeout-seconds>
</transaction-descriptor>
<jndi-name>statelessSession.EcasServicesHome</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
cheers !
Dips -
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 -
Weblogic-ejb-jar.xml issues
We here in my development group with FedEX are moving from
Weblogic 8.1.0 to 9.2.1. I am having issues with the weblogic-ejb-jar.xml file as follows:
In the header or whatr ever it is called (I am not a WL admin)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 9.2.0 EJB//EN" "http://www.bea.com/servers/wls921/dtd/weblogic-ejb-jar.dtd">
I have changed the:
//DTD WebLogic 8.1.0 EJB//EN" TO
//DTD WebLogic 9.2.1 EJB//EN"
AND
"http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd"
TO
"http://www.bea.com/servers/wls921/dtd/weblogic-ejb-jar.dtd"
The deployment likes or doesn't grip about:
"http://www.bea.com/servers/wls921/dtd/weblogic-ejb-jar.dtd"
BUT
does not like:
//DTD WebLogic 9.2.1 EJB//EN" says it has to be 8.1.0 or earlier.
I have not been able to find any info on how to solve this problem.
I need 9.2.1 for the : "max-messages-in-transaction" element.
I could really need some help on this.
Thanks
SteveWe here in my development group with FedEX are moving from
Weblogic 8.1.0 to 9.2.1. I am having issues with the weblogic-ejb-jar.xml file as follows:
In the header or whatr ever it is called (I am not a WL admin)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 9.2.0 EJB//EN" "http://www.bea.com/servers/wls921/dtd/weblogic-ejb-jar.dtd">
I have changed the:
//DTD WebLogic 8.1.0 EJB//EN" TO
//DTD WebLogic 9.2.1 EJB//EN"
AND
"http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd"
TO
"http://www.bea.com/servers/wls921/dtd/weblogic-ejb-jar.dtd"
The deployment likes or doesn't grip about:
"http://www.bea.com/servers/wls921/dtd/weblogic-ejb-jar.dtd"
BUT
does not like:
//DTD WebLogic 9.2.1 EJB//EN" says it has to be 8.1.0 or earlier.
I have not been able to find any info on how to solve this problem.
I need 9.2.1 for the : "max-messages-in-transaction" element.
I could really need some help on this.
Thanks
Steve -
How will be the weblogic-ejb-jar and ejb-jar xml for EJB Local Interface?
Hi,
I have one ear application which is using Stateless Session Beans. I don't have any Bean to Bean communication . At present, the client is invoking remote methods thro Home/Remote interfaces. My doubt is , shall I implement EJBLocal home/ local interface to obtain this same functionality cos, in this app, both client and EJb bean have been deployed in same JVM. Can Local interfaces only be applicable to Bean - Bean relation ship?If LocalHome/Local interfaces can be implemented in my scenario, then may I know how will be the ejb-jar.xml and weblogic-ejb-jar.xml?
thanks and regards,
Venkat.Local 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.. -
Discrepancy between weblogic-ejb-jar.xml DTD and documentation
There seems to be a discrepancy between the DTD for the weblogic-ejb-jar.xml file
and the WLS7 documentation: Which source of information should I treat as
For example, the WLS7 documentation contains no information on the <idempotent-methods>
element (and its child elements)
(There is also a (larger) discrepancy between the weblogic-application.xml DTD and
the docs - I will post that Q under application deployment)
Regards,
NickYep, I noticed it too. I used DTD, of course.
"Nick Minutello" <[email protected]> wrote
in message news:[email protected]..
>
>
There seems to be a discrepancy between the DTD for theweblogic-ejb-jar.xml file
and the WLS7 documentation: Which source of information should I treat as
For example, the WLS7 documentation contains no information on the<idempotent-methods>
element (and its child elements)
(There is also a (larger) discrepancy between the weblogic-application.xmlDTD and
the docs - I will post that Q under application deployment)
Regards,
Nick -
Will weblogic-ejb-jar.xml dtd 6.0 working fine on server 8.1?
Hi guys,
I have problem when use weblogic-ejb-jar.xml on server 8.1. JNDI compalain can not find local-home.
Thanks!The interfaces and ejb-jar.xml, weblogic-ejb-jar.xml were generated by Xdoclet. I just copy the .ear file to the deployment directory. Is there anything more I need to do? Thanks!
Here is the error message:
javax.naming.LinkException: . Root exception is javax.naming.NameNotFoundException: remaining name: java:app/ejb/sims_hta.jar#HierarchyAdminSession/local-home
at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)
at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:265)
at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:732)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:196)
at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:237)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:336)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.hta.servlet.HTAUtil.getHierarchyAdminSessionLocal(HTAUtil.java:622)
at com.hta.servlet.HTAUtil.getPropertyDictionaryValues(HTAUtil.java:745)
at com.hta.servlet.jsp.bean.Admin.getPropertyDictinaryValues(Admin.java:870)
at com.hta.servlet.jsp.bean.Admin.getRunLevelDisplayParameters(Admin.java:819)
at jsp_servlet._sims_jsp._app._hta.__incell_import._jspService(__incell_import.java:463)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170) -
Sample weblogic-ejb-jar.xml for Resource-ref EJB 3.0
I am trying to create an MDB that can be re-used under different names.
@MessageDriven(description = "An MDB that transfers messages from one Queue to another", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue") })
@TransactionAttribute(TransactionAttributeType.REQUIRED)
public class TransferMdb implements MessageListener {
private static final Logger LOG = Logger.getLogger(TransferMdb.class);
@Resource(name = "jms/connfactory")
private ConnectionFactory connectionFactory;
@Resource(name = "jms/targetDestination")
private Queue targetDestination;
<ejb-jar version="3.0" 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_3_0.xsd">
<enterprise-beans>
<message-driven>
<ejb-name>TransferMdb</ejb-name>
<ejb-class>TransferMdb</ejb-class>
</message-driven>
</enterprise-beans>
</ejb-jar>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>TransferMdb</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>200</max-beans-in-free-pool>
<initial-beans-in-free-pool>5</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>test_queue</destination-jndi-name>
<transaction-descriptor>
<trans-timeout-seconds>20</trans-timeout-seconds>
</transaction-descriptor>
</message-driven-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jms/connectionfactory</res-ref-name>
<jndi-name>connectionfactory</jndi-name>
</resource-description>
<resource-description>
<res-ref-name>jms/targetDestination</res-ref-name>
<jndi-name>reply_queue</jndi-name>
</resource-description>
</reference-descriptor>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
However when I deploy the above, I get exceptions such as:
problem: cvc-complex-type.2.4a: Expected elements 'initial-context-factory@http://www.bea.com/ns/weblogic/weblogic-ejb-jar provider-url@http://www.bea.com/ns/weblogic/weblogic-ejb-jar connection-factory-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-polling-interval-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar generate-unique-jms-client-id@http://www.bea.com/ns/weblogic/weblogic-ejb-jar durable-subscription-deletion@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-messages-in-transaction@http://www.bea.com/ns/weblogic/weblogic-ejb-jar distributed-destination-connection@http://www.bea.com/ns/weblogic/weblogic-ejb-jar use81-style-polling@http://www.bea.com/ns/weblogic/weblogic-ejb-jar init-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar max-suspend-seconds@http://www.bea.com/ns/weblogic/weblogic-ejb-jar security-plugin@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element message-driven-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
problem: cvc-complex-type.2.4a: Expected elements 'transaction-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar iiop-security-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar resource-env-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar ejb-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar service-reference-description@http://www.bea.com/ns/weblogic/weblogic-ejb-jar enable-call-by-reference@http://www.bea.com/ns/weblogic/weblogic-ejb-jar network-access-point@http://www.bea.com/ns/weblogic/weblogic-ejb-jar clients-on-same-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar run-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar create-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remove-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar passivate-as-principal-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar local-jndi-name@http://www.bea.com/ns/weblogic/weblogic-ejb-jar dispatch-policy@http://www.bea.com/ns/weblogic/weblogic-ejb-jar remote-client-timeout@http://www.bea.com/ns/weblogic/weblogic-ejb-jar stick-to-first-server@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' instead of 'reference-descriptor@http://www.bea.com/ns/weblogic/weblogic-ejb-jar' here in element weblogic-enterprise-bean@http://www.bea.com/ns/weblogic/weblogic-ejb-jar:<null>
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:234)
at weblogic.descriptor.internal.MarshallerFactory$1.evaluateResults(MarshallerFactory.java:221)
at weblogic.descriptor.internal.MarshallerFactory$1.createDescriptor(MarshallerFactory.java:146)
at weblogic.descriptor.BasicDescriptorManager.createDescriptor(BasicDescriptorManager.java:306)
at weblogic.application.descriptor.AbstractDescriptorLoader2.getDescriptorBeanFromReader(AbstractDescriptorLoader2.java:788)
Truncated. see log file for complete stacktrace
I am clearly missing items in the weblogic-ejb-jar.xml. If anyone has a sample or tips, that would be awesome as a starting point.Those tags just declare that you are using our CMP provider and that
your descriptor is in META-INF/weblogic-cmp-rdbms-jar.xml.
FWIW, you might also want to check out EJBGen. It tends to keep more up
to date with WLS than xdoclet.
-- Rob
Gen wrote:
I am using xdoclets to generate descriptor file weblogic-ejb-jar.xml
for a BMP entity bean. Xdoclet is generating the descriptor file
alright, but is putting the following extra tags. This happens even
for samples which come with the download, so my tags in java file are
not wrong.
My question is, are the extra tags below harmless, or should I
manually go to each desciptor file and remove them?
Thanks.
----------- EXTRA TAGS GENERATED START ---------
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>
----------- EXTRA TAGS GENERATED END ---------
----------- TAGS I PUT IN JAVA CLASS START --------
* @ejb:bean name="com.ejb.entity.Customer"
* jndi-name="com.ejb.entity.CustomerHome"
* view-type="remote"
* type="BMP"
* primkey-field="com.ejb.entity.CustomerPK"
* reentrant="false"
* @weblogic:cache
* max-beans-in-cache="1000"
* read-timeout-seconds="900"
* concurrency-strategy="ReadOnly"
----------- TAGS I PUT IN JAVA CLASS END -------- -
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
Maybe you are looking for
-
Post Author: JuneCruz CA Forum: Data Connectivity and SQL These is my table with 3 fields NFstCol, NsndCol, and NtrdCol NFstCol NSndCol NTrdCol - 1 One 12 One 13 One 14 Two 15 Two 16 Two 17
-
i have asked to have my security qeustions reset but have not gotten a email from them yet
-
Password policy not allowing to reconfigure STMS
Hi Guru's, I have done system copy by database restore method, in post activities I have mistakenly deleted STMS configuration on domain controller, now when I am trying to add production server in landscape. the password policy is not allowing us to
-
802.1x and TACACS+
I use the ACS box mainly for AAA on the switches and routers using tacacs. Now we're looking at the possibility of using 802.1x, my early reading tell me I have to use RADIUS, but I'm using TACACS, can I have ttow different methods of authentication
-
Convergence - Using External Accounts with POP/SSL
Using Convergence v. 1.0-10.01 I'm trying to use the External Accounts feature of Convergence for a POP account requiring SSL. The POP logs on the Sun messaging server hosting the external account show: 20090930 154527 /opt/SUNWmsgsr/config/PopProxyA