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,
Amit
There 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
Similar Messages
-
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 -
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 -
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 -------- -
Weblogic-ejb-jar.xml for a Session EJB
The weblogic-ejb-jar.xml generated for a Session EJB with local interfaces has a jndi-name element instead of local-jndi-name.
1. Create a Session EJB.
Select Include Local Interfaces.
2. In the META-INF directory select New>General>Deployment Descriptors>weblogic-ejb-jar.xml
The deployment descriptor generated has a jndi-name element.
For a Session EJB with local interfaces the element should be local-jndi-name.
thanks,
Deepakweblogic-ejb-jar.xml jndi-name (instead of local-jndi-name) is with JDeveloper version 10.1.2 & 10.1.3
-
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) -
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 -
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 -
Deploy ejb on wls7.0 weblogic.ejb.jar.xml ! help
Morning !
i'm try to deploy a EJB on wls7.0
my descriptor is like this and i don't really undestand what's go wrong.
thanks you to help
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC "-//BEA Systems, Inc.//DTD WebLogic 7.0.0
EJB//EN" "http://www.bea.com/servers/wls700/dtd/weblogic700-ejb-jar.dtd" >
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<entity>
<ejb-name>Compte</ejb-name>
<bean-home-name>Compte</bean-home-name>
<resource-ref>
<res-ref-name>jdbc/DataSource</res-ref-name>
<jndi-name>DataSource</jndi-name>
</resource-ref>
<cmp-info>
<database-map>
<table>"Compte"</table>
<column-map>
<field-name>id</field-name>
<column-name>"id"</column-name>
</column-map>
<column-map>
<field-name>nomSte</field-name>
<column-name>"nomSte"</column-name>
</column-map>
<column-map>
<field-name>dateCreation</field-name>
<column-name>"dateCreation"</column-name>
</column-map>
<column-map>
<field-name>nbEmployes</field-name>
<column-name>"nbEmployes"</column-name>
</column-map>
<column-map>
<field-name>caSte</field-name>
<column-name>"caSte"</column-name>
</column-map>
<column-map>
<field-name>descSte</field-name>
<column-name>"descSte"</column-name>
</column-map>
<column-map>
<field-name>logo</field-name>
<column-name>"logo"</column-name>
</column-map>
<column-map>
<field-name>id_commercial</field-name>
<column-name>"id_commercial"</column-name>
</column-map>
</database-map>
<finder>
<method-signature>findAll()</method-signature>
<where-clause />
<load-state>True</load-state>
</finder>
</cmp-info>
</entity>
<datasource-definitions>
<datasource>
<jndi-name>DataSource</jndi-name>
<url>jdbc:odbc:dev_java</url>
<username>sa</username>
<password>lnx.sully</password>
<driver-class-name>sun.jdbc.odbc.JdbcOdbcDriver</driver-class-name>
</datasource>
</datasource-definitions>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
the EXception is !
Exception
weblogic.management.ApplicationException: No deployment found at
E:\bea70\weblogic700\server\bin\GRPEJB.jar.
at
weblogic.j2ee.J2EEApplicationContainerFactory.initializeDeployment(J2EEAppli
cationContainerFactory.java:350)
at
weblogic.management.deploy.DeployerRuntime.unprotectedActivate(DeployerRunti
me.java:350)
at
weblogic.management.deploy.DeployerRuntime.access$0(DeployerRuntime.java:282
at
weblogic.management.deploy.DeployerRuntime$1.run(DeployerRuntime.java:947)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.management.deploy.DeployerRuntime.checkAndPerformDeployerActions(De
ployerRuntime.java:941)
at
weblogic.management.deploy.DeployerRuntime.activate(DeployerRuntime.java:279
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:717)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
99)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at
weblogic.management.internal.RemoteMBeanServerImpl.invoke(RemoteMBeanServerI
mpl.java:921)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:470)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:198)
at $Proxy48.activate(Unknown Source)
at
weblogic.management.console.actions.mbean.ConfigureAppWizardAction.commit(Co
nfigureAppWizardAction.java:248)
at
weblogic.management.console.actions.mbean.ConfigureAppWizardAction.perform(C
onfigureAppWizardAction.java:100)
at
weblogic.management.console.actions.internal.ActionServlet.doAction(ActionSe
rvlet.java:171)
at
weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServ
let.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:945)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:332)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:242)
at
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:5360)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:721)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3043)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2468)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:152)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:133)
tahnks you !
Unimon Thierry
CGBI- CET-E-services
69, Blvd Galliéni
91 Issy les Mlx
tele :01/55/95/54/22 Poste:5422
Port :06/61/81/78/59
Prof : mailto:[email protected]
Pers : mailto:[email protected]oops! 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 -
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? -
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 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 -
Disable-warning statement in weblogic-ejb-jar.xml
I'm having problems with the <disable-warning> statement in the weblogic-ejb-jar.xml file. I havn't been able to find documentation on exactly where the statment is supposed to be placed, as all sites just say to include the statement in your weblogic-ejb-jar.xml file. I found a working solution where I placed the statement after declaring all the weblogic-enterprise-bean and right before the closing </weblogic-ejb-jar> statment.
Now the problem is that I have included a <transaction-isolation> block and weblogic complains about my disable warning statment.
Does anyone know the proper location for the <disable-warning> statement?
here is the format that was working before:
</weblogic-enterprise-bean>
<disable-warning>BEA-010054</disable-warning>
</weblogic-ejb-jar> now I have:
</weblogic-enterprise-bean>
<transaction-isolation>
<isolation-level>TRANSACTION_READ_COMMITTED</isolation-level>
<method>
</method>
</transaction-isolation>
<disable-warning>BEA-010054</disable-warning>
</weblogic-ejb-jar>I have tried putting the disable warning before the transaction-isolation and after and weblogic complains about both.
Any Ideas?
Thanks for your time.I have tried putting the disable warning beforethe
transaction-isolation and after and weblogic
complains about both.
Any Ideas?It would be a good idea to post the message weblogic
is displaying. There are a couple of things you could
check:
* As per the documentation, the <disable-warning> tag
was added in 8.1. Check if you are using the correct
DTD for Weblogic 8.1 (and the version of Weblogic
is 8.1 or higher
* As per the DTD, the <disable-warning> comes after
the <transaction-isolation>
<!ELEMENT weblogic-ejb-jar (description?,
weblogic-enterprise-bean*,
security-role-assignment*,
run-as-role-assignment*,
security-permission?,
transaction-isolation*,
idempotent-methods?,
enable-bean-class-redeploy?,
disable-warning*)
ke sure you maintain this order of elements within
<weblogic-ejb-jar>
Refer to
http://e-docs.bea.com/wls/docs81/ejb/DDreference-ejb-j
ar.htmlYep, it was pointing to an older dtd. Thank you! -
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 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.
Maybe you are looking for
-
Import Meta Data from CSV - Export Meta Data to CSV
Ability to import meta data into selected images from CSV file containing a number of fields, one of which is file name. The other fields would be selected tags to import. Import logic would be, Where file name in column 1 matches current selected fi
-
OS is Windows 2000. Problem is with websites in general. Pictures are frequently missing or are blank unless download is attempted more than once. Ads are frequently downloaded as blank.areas. No problems downloading text only sites. PDF file downloa
-
Use awt to display histogram in a JSP?!
Hi, I have been searching the web in the area awt and JSP and it feels like I am fumbling in the dark. I want to display a histogram, which shall be updated continuously from a database. I have found a program example, which is creating a histogram u
-
Planned delivery time in material master
Is planned delivery time in material master considering holidays ? I mean when I say 7 days, is it one week and 2 days or only one week ?
-
HELP ME!! keep getting error message when DLing iOS 5
I have been trying to download the iOS 5 update for my iphone 4 but i keep getting the following error message: "There was a problem downloading the software for the iphone "___". The network connection timed out. Make sure your network settings are