You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by "a.afettsa33" <a....@gmail.com> on 2012/09/27 19:03:40 UTC

Error with ejb3 + openEJB + Weblogic

Hi,
I'm trying to test EJB 3.0 with openEJB but an error occurred...


[severity=ERROR,message=unexpected element
(uri:"http://www.bea.com/ns/weblogic/90",
local:"business-interface-jndi-name-map"). Expected elements are
<{http://www.bea.com/ns/weblogic/90}pool>,<{http://www.bea.com/ns/weblogic/90}stateless-clustering>,<{http://www.bea.com/ns/weblogic/90}timer-descriptor>,locator=[node=null,object=null,url=null,line=7,col=47,offset=-1]]
javax.xml.bind.UnmarshalException: unexpected element
(uri:"http://www.bea.com/ns/weblogic/90",
local:"business-interface-jndi-name-map"). Expected elements are
<{http://www.bea.com/ns/weblogic/90}pool>,<{http://www.bea.com/ns/weblogic/90}stateless-clustering>,<{http://www.bea.com/ns/weblogic/90}timer-descriptor>
	at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:616)
	at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244)

ERROR - FATAL ERROR: Unknown error in Assembler.  Please send the following
stack trace and this message to users@openejb.apache.org :
 java.lang.ClassCastException: java.net.URL cannot be cast to
org.apache.openejb.jee.wls.WeblogicEjbJar
	at
org.apache.openejb.config.WlsConversion.convertModule(WlsConversion.java:125)

--------> weblogic-ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-ejb-jar xmlns="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
http://xmlns.oracle.com/weblogic/weblogic-ejb-jar
http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd">     

    <weblogic-enterprise-bean>
        <ejb-name>NewSessionBean</ejb-name>
        <stateless-session-descriptor>
            <business-interface-jndi-name-map>
               
<business-remote>com.sample.NewSessionBeanInterfaceRemote</business-remote>
                <jndi-name>NewSessionBean</jndi-name>
            </business-interface-jndi-name-map>
        </stateless-session-descriptor>
    </weblogic-enterprise-bean>
        
</weblogic-ejb-jar>  

--------> ejb-jar.xml

<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee" 
         version = "3.0" 
         xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" 
         xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
</ejb-jar>


--------> pom.xml

<dependency>
  <groupId>org.apache.openejb</groupId>
  <artifactId>openejb-core</artifactId>
 <version>3.1.4</version>
</dependency>


Can anybody help me?





--
View this message in context: http://openejb.979440.n4.nabble.com/Error-with-ejb3-openEJB-Weblogic-tp4657675.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Error with ejb3 + openEJB + Weblogic

Posted by David Blevins <da...@gmail.com>.
On Sep 27, 2012, at 4:18 PM, a.afettsa33 wrote:

> I need to customize the JNDI name for WebLogic Server...  I need the file
> weblogic-ejb-jar.xml

Try setting this property 'openejb.vendor.config' to 'NONE'.  That should cause the weblogic-ejb-jar.xml to be ignored.  Then you can specify the JNDI format you want using the openejb-jar.xml descriptor as detailed here http://tomee.apache.org/jndi-names.html.

If you set openejb.vendor.config successfully you should see it in the log output at INFO level.

-David




Re: Error with ejb3 + openEJB + Weblogic

Posted by "a.afettsa33" <a....@gmail.com>.
I need to customize the JNDI name for WebLogic Server...  I need the file
weblogic-ejb-jar.xml



--
View this message in context: http://openejb.979440.n4.nabble.com/Error-with-ejb3-openEJB-Weblogic-tp4657675p4657684.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Error with ejb3 + openEJB + Weblogic

Posted by Romain Manni-Bucau <rm...@gmail.com>.
You are looking for http://tomee.apache.org/jndi-names.html
Le 27 sept. 2012 20:36, "a.afettsa33" <a....@gmail.com> a écrit :

> I need the descriptor because I want to customize the jndi-name of the EJB
> @Remote...
> changing to a new version also generates error...
> When I remove the tag weblogic-enterprise-bean works ...
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Error-with-ejb3-openEJB-Weblogic-tp4657675p4657680.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: Error with ejb3 + openEJB + Weblogic

Posted by "a.afettsa33" <a....@gmail.com>.
I need the descriptor because I want to customize the jndi-name of the EJB
@Remote...
changing to a new version also generates error...
When I remove the tag weblogic-enterprise-bean works ...



--
View this message in context: http://openejb.979440.n4.nabble.com/Error-with-ejb3-openEJB-Weblogic-tp4657675p4657680.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: Error with ejb3 + openEJB + Weblogic

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

Our weblo descriptors were probably not complete. Maybe dont use them or
try with a more recent release (i dont know if it was updated)
Le 27 sept. 2012 19:19, "a.afettsa33" <a....@gmail.com> a écrit :

> Hi,
> I'm trying to test EJB 3.0 with openEJB but an error occurred...
>
>
> [severity=ERROR,message=unexpected element
> (uri:"http://www.bea.com/ns/weblogic/90",
> local:"business-interface-jndi-name-map"). Expected elements are
> <{http://www.bea.com/ns/weblogic/90}pool>,<{
> http://www.bea.com/ns/weblogic/90}stateless-clustering>,<{
> http://www.bea.com/ns/weblogic/90}timer-descriptor
> >,locator=[node=null,object=null,url=null,line=7,col=47,offset=-1]]
> javax.xml.bind.UnmarshalException: unexpected element
> (uri:"http://www.bea.com/ns/weblogic/90",
> local:"business-interface-jndi-name-map"). Expected elements are
> <{http://www.bea.com/ns/weblogic/90}pool>,<{
> http://www.bea.com/ns/weblogic/90}stateless-clustering>,<{
> http://www.bea.com/ns/weblogic/90}timer-descriptor>
>         at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:616)
>         at
>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244)
>
> ERROR - FATAL ERROR: Unknown error in Assembler.  Please send the following
> stack trace and this message to users@openejb.apache.org :
>  java.lang.ClassCastException: java.net.URL cannot be cast to
> org.apache.openejb.jee.wls.WeblogicEjbJar
>         at
>
> org.apache.openejb.config.WlsConversion.convertModule(WlsConversion.java:125)
>
> --------> weblogic-ejb-jar.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
> <weblogic-ejb-jar xmlns="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar
> "
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd
> http://xmlns.oracle.com/weblogic/weblogic-ejb-jar
> http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.0/weblogic-ejb-jar.xsd
> ">
>
>     <weblogic-enterprise-bean>
>         <ejb-name>NewSessionBean</ejb-name>
>         <stateless-session-descriptor>
>             <business-interface-jndi-name-map>
>
> <business-remote>com.sample.NewSessionBeanInterfaceRemote</business-remote>
>                 <jndi-name>NewSessionBean</jndi-name>
>             </business-interface-jndi-name-map>
>         </stateless-session-descriptor>
>     </weblogic-enterprise-bean>
>
> </weblogic-ejb-jar>
>
> --------> ejb-jar.xml
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <ejb-jar xmlns = "http://java.sun.com/xml/ns/javaee"
>          version = "3.0"
>          xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
>          xsi:schemaLocation = "http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd">
> </ejb-jar>
>
>
> --------> pom.xml
>
> <dependency>
>   <groupId>org.apache.openejb</groupId>
>   <artifactId>openejb-core</artifactId>
>  <version>3.1.4</version>
> </dependency>
>
>
> Can anybody help me?
>
>
>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/Error-with-ejb3-openEJB-Weblogic-tp4657675.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>