Conver cmp1.1 bean's descriptor(WLS5.1) to cmp1.1 bean's descriptor(WLS6.0)

we have use
$java weblogic.ejb20.utils.DDConverter -verboseLog -EJBVer 1.1 -d ../ejb20/ emr.jar
but got error messages in using ejbc
bash-2.03$ java weblogic.ejbc emr.jar emr1.jar
ERROR: Error from ejbc: [9.4.1] In EJB FavoriteMREntityBean, CMP Fields must NOT
be defined in the BeanClass
ERROR: ejbc found errors
here are error messages
DDConverter starting at Jun 19, 2001 10:26:16 AM...
Source file list:
emr.jar
Output directory: ../ejb20/
WARNING: Converting connection pool reference "emdbPool" to a data source reference.
Be sure there is a data source of that name declared in the server configuration.
ERROR: There was an error converting the finder query from WLQL to EJB QL. The
query text was "(= 1 1)". The exception received was:
weblogic.ejb20.cmp.rdbms.RDBMSException: weblogic.ejb20.cmp11.rdbms.finders.IllegalExpressionException:
weblogic.ejb20.cmp11.rdbms.finders.IllegalExpressionException:
While trying to process null
Invalid Operation attempted in WLQL expression: EQ
cannot translate from WLQL to EJB QL
Suggest that you use following EJB QL: FROM <abstract-schema-name> AS X
Usage of EJB QL of this form will result in a Finder with no WHERE clause
WARNING: Converting connection pool reference "emdbPool" to a data source reference.
Be sure there is a data source of that name declared in the server configuration.
ERROR: There was an error converting the finder query from WLQL to EJB QL. The
query text was "(= 1 1)". The exception received was:
weblogic.ejb20.cmp.rdbms.RDBMSException: weblogic.ejb20.cmp11.rdbms.finders.IllegalExpressionException:
weblogic.ejb20.cmp11.rdbms.finders.IllegalExpressionException:
While trying to process null
Invalid Operation attempted in WLQL expression: EQ
cannot translate from WLQL to EJB QL
Suggest that you use following EJB QL: FROM <abstract-schema-name> AS X
Usage of EJB QL of this form will result in a Finder with no WHERE clause
WARNING: Because of EJB specification changes, CMP beans are not backward compatible.
The output jar is not deployable. You need to change the source code, compile
them with the .xml files in this jar by using ejbc, then deploy the new jar.
<!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>EmrJcoBean</ejb-name>
<jndi-name>EmrJco</jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>FavoriteMaterialBean</ejb-name>
<jndi-name>FavoriteMaterial</jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>FavoriteMREntityBean</ejb-name>
<persistence-descriptor>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>5.1.0</type-version>
<type-storage>META-INF/FavoriteMREntityBean-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>5.1.0</type-version>
</persistence-use>
</persistence-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/emdbSource</res-ref-name>
<jndi-name>emdbSource</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>FavoriteMREntity</jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>FavoriteMRSessionBean</ejb-name>
<jndi-name>FavoriteMRSession</jndi-name>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>EmrFavoriteMaterialEntityBean</ejb-name>
<persistence-descriptor>
<persistence-type>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>5.1.0</type-version>
<type-storage>META-INF/EmrFavoriteMaterialEntityBean-cmp-rdbms-jar.xml</type-storage>
</persistence-type>
<persistence-use>
<type-identifier>WebLogic_CMP_RDBMS</type-identifier>
<type-version>5.1.0</type-version>
</persistence-use>
</persistence-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/emdbSource</res-ref-name>
<jndi-name>emdbSource</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>EmrFavoriteMaterialEntity</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
<!DOCTYPE weblogic-rdbms-bean PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0
EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-rdbms-persistence.dtd'>
<weblogic-rdbms-bean>
<pool-name>emdbPool</pool-name>
<table-name>EMR_TBL_FMATERIAL</table-name>
<attribute-map>
<object-link>
<bean-field>m_empid</bean-field>
<dbms-column>EMPID</dbms-column>
</object-link>
<object-link>
<bean-field>m_materialno</bean-field>
<dbms-column>MATERIALNO</dbms-column>
</object-link>
<object-link>
<bean-field>m_plant</bean-field>
<dbms-column>PLANT</dbms-column>
</object-link>
<object-link>
<bean-field>m_descript</bean-field>
<dbms-column>DESCRIPT</dbms-column>
</object-link>
<object-link>
<bean-field>m_vendorpartno</bean-field>
<dbms-column>VENDORPARTNO</dbms-column>
</object-link>
<object-link>
<bean-field>m_uom</bean-field>
<dbms-column>UOM</dbms-column>
</object-link>
<object-link>
<bean-field>m_counter</bean-field>
<dbms-column>COUNTER</dbms-column>
</object-link>
<object-link>
<bean-field>m_firstdate</bean-field>
<dbms-column>FIRSTDATE</dbms-column>
</object-link>
<object-link>
<bean-field>m_lastdate</bean-field>
<dbms-column>LASTDATE</dbms-column>
</object-link>
</attribute-map>
<finder-list>
<finder>
<method-name>findAll</method-name>
<finder-query><![CDATA[ (= 1 1) ]]></finder-query>
</finder>
</finder-list>
<options></options>
</weblogic-rdbms-bean>
<!DOCTYPE weblogic-rdbms-bean PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 5.1.0
EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls510/dtd/weblogic-rdbms-persistence.dtd'>
<weblogic-rdbms-bean>
<pool-name>emdbPool</pool-name>
<table-name>EMR_TBL_FMR</table-name>
<attribute-map>
<object-link>
<bean-field>mrno</bean-field>
<dbms-column>mrno</dbms-column>
</object-link>
<object-link>
<bean-field>empid</bean-field>
<dbms-column>empid</dbms-column>
</object-link>
<object-link>
<bean-field>name</bean-field>
<dbms-column>name</dbms-column>
</object-link>
<object-link>
<bean-field>plant</bean-field>
<dbms-column>plant</dbms-column>
</object-link>
<object-link>
<bean-field>costcenter</bean-field>
<dbms-column>costcenter</dbms-column>
</object-link>
</attribute-map>
<finder-list>
<finder>
<method-name>findAll</method-name>
<finder-query><![CDATA[ (= 1 1) ]]></finder-query>
</finder>
</finder-list>
<options></options>
</weblogic-rdbms-bean>

Hi,
I am getting a similar error. I have changed the implementation of the bean to use abstract methods. I am getting an error:
Error from ejbc: In EJB productBean, CMP Fields must NOT be defined in the BeanClass.

Similar Messages

  • Re: conver cmp1.1 bean's descriptor(WLS5.1) to cmp1.1 bean's descriptor(WLS6.0)

    Hello,
    Did you change the implementation of the bean. In ejb 1.1 you define for
    example "public String cmpfield;", but in ejb 2.0 this is changed to 2
    methods "public abstract String getCmpfield(); public abstract void
    setCmpfield(String val);" you only have to convert the dd when you implement
    the beans in cmp 2.0 Otherwise you can use the dd of ejb 1.1
    Regards
    Nico
    "weber" <[email protected]> wrote in message
    news:3b2f9a45$[email protected]..
    >
    we have use
    $java weblogic.ejb20.utils.DDConverter -verboseLog -EJBVer 1.1 -d../ejb20/ emr.jar
    >
    but got error messages in using ejbc
    bash-2.03$ java weblogic.ejbc emr.jar emr1.jar
    ERROR: Error from ejbc: [9.4.1] In EJB FavoriteMREntityBean, CMP Fieldsmust NOT
    be defined in the BeanClass
    ERROR: ejbc found errors

    Hi,
    I am getting a similar error. I have changed the implementation of the bean to use abstract methods. I am getting an error:
    Error from ejbc: In EJB productBean, CMP Fields must NOT be defined in the BeanClass.

  • Java.security.manager ?

    My understanding about Java SecurityManager is when you want to use it,
    it have to be installed. It can be installed through
    using -Djava.security.manager
    option with java command or calling setSecurityManager() in the application.
    I'm sure that WLS startup script marketed with WLS5.1
    used -Djava.security.manager
    option, however, WLS6.1 and WLS7.0's script don't use the option. Do they
    install a SecurityManager through setSecurityManager() method?
    I'm just curious to know why they are different between WLS5.1 and
    WLS6.1/7.0.
    Thanks in advance,
    Koji Sekiguchi

    6.1 and 7.0 do not install a SecurityManager programattically. It was
    decided that most people do not make use of the added security provided
    by the security manager and that it has a significant performance hit on
    the VM (I think we found 6-7% degradation but it was a long time ago so
    I may be way off) so that it did not make sense to run with it by
    default. Instead we tell people to turn it on who need it. It seems
    better because all of the security conscious people know to look for it
    and all of the security unaware folk don't know enough to turn it off so
    they are stuck with the degradation.
    The SecurityManager is really most helpful if you are installing
    untrusted applications on your app server (something most users don't
    do). It does next-to-nothing to prevent remote attacks.
    Neil Smithline
    Koji Sekiguchi wrote:
    My understanding about Java SecurityManager is when you want to use it,
    it have to be installed. It can be installed through
    using -Djava.security.manager
    option with java command or calling setSecurityManager() in the application.
    I'm sure that WLS startup script marketed with WLS5.1
    used -Djava.security.manager
    option, however, WLS6.1 and WLS7.0's script don't use the option. Do they
    install a SecurityManager through setSecurityManager() method?
    I'm just curious to know why they are different between WLS5.1 and
    WLS6.1/7.0.
    Thanks in advance,
    Koji Sekiguchi

  • WLS6.1 - to - WLS 6.1 using t3 protocol

    Is it possible to make a call using t3 protocol ( without using iiop) from WLS6.1sp2(#1)
    to WLS 6.1sp2(#2), which are NOT in cluster
    A) servlet on #1 to ejb on #2 B) ejb on #1 to ejb on #2
    The WLS to WLS example talks about using iiop for WLS6.1sp2 to WLS5.1 sp11 but it
    doesnot talk about wls6.1 to wls6.1

    Hi,
    We skipped 5.1 and jumped directly from 4.51 to 6.0 so I don't know how
    5.1 differs from 6.0 in that respect but the same works in 4.51 and 6.x .
    As for the server names -- it is the way the server connection manager
    (RMI connections) caches the connections. If your two servers have the
    same names one of those connections will be closed and you'll get
    exceptions when trying to connect to the other server. It is a 6.1
    feature and it shouldn't be that hard to reproduce in your environment.
    (There are post for this also in the JMS newsgroup).
    --dejan
    Harshad Nanal wrote:
    Thanks guys for hte info
    BUT
    I had tried sometime back with WLS5.1 sp6 on both the sides.I was unable to access
    the serverWLS#2 from WLS#1 unless both are in clusters. Event the same was confirmed
    by BEA support team on EVALNET
    Have the things changed with wls5.1 sp11.
    In wls6.1 sp2 why servers should have different names when they run on different
    IP address
    "Vyas" <[email protected]> wrote:
    Weblogic has checks between different versions of t3 (t3 version is supposedly
    different
    from 5.x to 6.x) to disable t3 communication between these versions. One
    of way getting
    around is to use iiop.
    There is no such problem between same versions of WL so no need to do anything
    special.
    "Harshad Nanal" <[email protected]> wrote:
    Is it possible to make a call using t3 protocol ( without using iiop) from
    WLS6.1sp2(#1)
    to WLS 6.1sp2(#2), which are NOT in cluster
    A) servlet on #1 to ejb on #2 B) ejb on #1 to ejb on #2
    The WLS to WLS example talks about using iiop for WLS6.1sp2 to WLS5.1 sp11
    but it
    doesnot talk about wls6.1 to wls6.1

  • Deployment descriptor error for an EJB 3.0 entity bean module

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

    Hi all,
    i'm facing an error deploying an EJB 3.0 entity bean module wrapped in an enterprise application on WebLogic 10.
    The application is composed as follows:
    WASEnterprise.ear
    |-META-INF
    |-application.xml
    |-WAS.jar
    |-META-INF
    |-persistence.xml
    In other words the application server is unable to load persistence.xml deployment descriptor and,during deployment, it throws an error message like this:
    <Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\bea\user_projects\domains\base_domain\autodeploy\WASEnterprise\WAS/META-INF/persistence.xml of module WAS. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed
    I suppose that the persistence.xml is correct since i can deploy the application on jboss without any problem.
    The persistence.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <persistence>
    <persistence-unit name="CNT4">
    <non-jta-data-source>cnt5ds</non-jta-data-source>
    <class>it.eni.italgas.was.db.entity.AsiDisco</class>
    <class>it.eni.italgas.was.db.entity.AsiErrori</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRouting</class>
    <class>it.eni.italgas.was.db.entity.WasAsiRoutingId</class>
    <class>it.eni.italgas.was.db.entity.WasAsiSchemas</class>
    </persistence-unit>
    </persistence>
    and the application.xml deployment descriptor is:
    <?xml version="1.0" encoding="UTF-8"?>
    <application xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_5.xsd">
    <display-name>WASEnterprise</display-name>
    <module id="myeclipse.1188512259959">
    <ejb>WAS.jar</ejb>
    </module>
    </application>
    I don't use any other weblogic specific deployment descriptor.
    Have you ever experienced such a strange behaviour? Can you suggest something to solve the problem?
    Thanks inadvance.
    Denis Maggiorotto

  • What makes a Bean? I thought it needed descriptor class, etc.

    I am getting confused. i see all over the place people saying they have a JavaBean and are using it in a JSP file. But it is always just a java class. Nothing about it is a bean as far as i can tell - or am I wrong? I thought it needed a descriptor class?

    You are not wrong, necessarily. There are no JavaBean interfaces to implement or base classes to subclass. Technically, any Java class is a (potential) JavaBean.
    That said, bean classes should follow the JavaBean specification to properly expose meta information -- properties, methods, and events. The preferred approach is via BeanInfo classes.
    I find the JavaBean component model lacking... the beans model is like an infants toy compared with other component models e.g., ActiveX.

  • How to realize timeout while invoking a method in remote sesssion bean using my session bean running on wls5.1

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

    I am using WL5.1 SP11 on a project. I have a stateless session bean inside which
    I will invoke a method defined in another stateless session bean in a remote weblogic
    server 5.1. The performance of the remote server is very low and sometimes when
    I invoke the method through RMI, I got to wait for a long time. So I want to set
    a timeout for my session bean while doing RMI call. The only parameter I could
    find in weblogic-ejb-jar.xml is the "transaction-timeout", but even if I set transaction
    attribute for my session bean, it always block there to wait for the response
    from the remote session bean. The configuation did not work.
    Is there any other solutions to my problem? Please give me some advice if anyone
    has experience on it, Thank you very much.

  • Convert cmp1.1 bean to cmp2.0: ejbc error for wls7.0

    Hi,
    I am trying to port EJB1.1 to EJB2.0 on WLS7.0. I have made changes to the DD. In the process of changing the beans, i made the bean class abstract and the getter and setter methods abstract too according to EJB2.0 specs. But i get an ejbc error like this:
    ERROR: Error from ejbc: In EJB AllowableProductBean, CMP fields must NOT be defined in the bean class. Can someone please tell me why this is so and what is the possible solution to this.
    Thanks!!

    In CMP 1.1, you'd have
    public double balance.
    In CMP 2.0, you'd have
    public abstract double getBalance();
    public abstract void setBalance(double b);
    You would not have a member field with the name balance. THat is why
    ejbc is complaining.
    -- Rob
    Suwarna wrote:
    Hi,
    I am trying to port EJB1.1 to EJB2.0 on WLS7.0. I have made changes to the DD. In the process of changing the beans, i made the bean class abstract and the getter and setter methods abstract too according to EJB2.0 specs. But i get an ejbc error like this:
    ERROR: Error from ejbc: In EJB AllowableProductBean, CMP fields must NOT be defined in the bean class. Can someone please tell me why this is so and what is the possible solution to this.
    Thanks!!

  • Implementation Difference b/w CMP1.1 and CMP2.0

    Hello Java gurus,
    Can any body help me in understanding the difference between CMP1.1 and CMP2.0 implementation. As per to EJB 2.0 specification, which says, In EJB 2.0 a container-managed entity bean is defined to be abstract and its persistent fields are not defined directly in the bean class. Instead, an abstract persistent schema has been developed that lets the bean provider declare the persistent fields and bean relationships indirectly, while in EJB1.1 spec, the persistent fields were defined in the bean class directly. I am unable to understand why in EJB 2.0 the persistent fields needs to be accessed thru setters/getters n not directly. What i can achieve by doing this?? Whether it is responsible for making relationship between various EJBs?? If yes then how does this will help to maintain a relationship between ejbs like one to one, one to many, and many to many. Because the relationship between beans whatever relationship it is) is defined in the deployment descriptor file. So if i am using the EJB1.1 approach for developing CMPs, i can still add those xml tags which establishes the relationship between EBJs. Can't I ???
    I just read one from java world site on "New In EJB2.0" but really unable to understand the problem which i have mentioned above. I am confused. Plz explain.
    Tx in Advance
    Jam

    Is there anyone to answer my question??? Plz help
    Thanx n regards
    Jam

  • 60 Second Delays in Client Getting Entity Bean (after finder method)

    I am running WLS5.1 with SP10. I have a stateless EJB that gets a
    read-write BMP entity EJB. My test client that executes the stateless
    session bean periodically encounters long delays (60 seconds or more)
    when acquiring the entity bean using its finder method. Logging shows
    the finder method is executing properly, and typically takes 180 ms to
    locate the entity bean; however, from the stateless session beans side,
    it appears to take 60 seconds. The test client is only a single thread,
    so I know the pool is not depleted, or anything like that. Something
    appears to be going haywire with the container.
    Does anybody have an idea what might be going on?
    Thanks.
    Greg

    Hi Greg,
    On a whim, I tried the same test with the thin driver, and the same
    delay occurred. This time, instead of a rollback being at the top ofthe
    thread dump stack trace, it was in some other Oracle call, with the
    top of the stack trace being a socketreader.are you using MTS? Is the db-server a SMP-box? Which exact patch level
    does your Oracle instance have? If yes, can you try to force a dedicated
    server connection and see if the problem disappears? I guess for an OCI
    connection you will have to edit tnsnames.ora, for a
    thin-driver-connection you would have to modify the connect string to
    something like this:
    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOS
    T=<dnsname>)(PORT=1521)))(CONNECT_DATA=(SID=<your
    sid>)(SERVER=DEDICATED))))
    There is a bug in 8.1.6.0 which is supposed to be fixed in 8.1.6.3, but
    I can still reproduce it in 9i :-(. It makes the MTS-dispatcher hang for
    60 seconds if you have an SMP box with low load, so maybe this could be
    your problem.
    Daniel
    -----Original Message-----
    From: Greg Crider [mailto:[email protected]]
    Posted At: Wednesday, November 28, 2001 8:17 AM
    Posted To: ejb
    Conversation: 60 Second Delays in Client Getting Entity Bean (after
    finder method)
    Subject: Re: 60 Second Delays in Client Getting Entity Bean (after
    finder method)
    My client has been using OCI in production and development
    with JTS for
    over a year now without a problem. We went to OCI because
    there was some
    other problem with the thin driver. I'm not sure what the
    problem was,
    but Oracle acknowledged it, but said it wouldn't be corrected until
    Oracle 9i came out. We're still using 8.1.6, so from what I'm
    told, we
    don't use the thin driver.
    On a whim, I tried the same test with the thin driver, and the same
    delay occurred. This time, instead of a rollback being at the
    top of the
    thread dump stack trace, it was in some other Oracle call, with the
    top of the stack trace being a socketreader.
    Somebody else suggested that there may be a problem with
    transactions.
    Does this ring a bell? Again, I have a stateless session bean
    invoking a
    read-write entity bean, invoking a read-only entity bean. From
    everything I read, including weblogic docs, I should just rely on my
    deployment descriptor to control transactions and stay away from JTA.
    Hi Greg,
    I remeber long ago there were an issue with jts/oci driver combination
    when the connections were opened but never used...
    Buy the way, are there any specific reasons to use OCI instead of
    thin driver?
    "Greg Crider" <[email protected]> wrote in message
    news:[email protected]...
    I know. That's what I don't get. BTW Slava, I am using the
    latest OCI
    driver; thanks for the suggestion. I tried tweaking some of the Solaris
    kernel settings as relates to TCP, but that didn't clear up the problem
    either; however, it did change the frequency. Modifying the retransmit
    settings (very small values, sub 1.5 seconds) seemed to make it occur
    less frequently.
    It seems like its time for me to contact BEA Support and see what they
    can turn up. Thanks for the suggestions. If anybody else has an idea,
    let me know. I'm betting this is a simple, stupid config problem. I'll
    post back here when I find out what's up.
    But for some reason WebLogic code called the rollback:
    ... rollback
    at
    weblogic.jdbc.common.internal.ConnectionEnv.cleanup(Connection
    Env.java:499)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Connection
    Env.java:417)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Connection
    Env.java:393)
    at weblogic.jdbcbase.jts.Connection.close(Connection.java:274)
    at weblogic.jdbcbase.jts.Connection.commit(Connection.java:530)
    at
    weblogic.jdbcbase.jts.TxConnection.commitOnePhase(TxConnection
    .java:55)
    at
    weblogic.jts.internal.CoordinatorImpl.commitSecondPhase(Coordi
    natorImpl.java
    :484)
    at
    weblogic.jts.internal.CoordinatorImpl.commit(CoordinatorImpl.java:383)
    at weblogic.jts.internal.TxContext.commit(TxContext.java:255)
    Slava Imeshev <[email protected]> wrote:
    Hi Greg,
    Which version of OCI driver do you use? OCI driver proved to be
    not that stable as the thin driver. Could you try to download
    and to install the latest version of the OCI driver and
    let us know
    if it helps?
    Regards,
    Slava Imeshev
    [email protected]
    "Greg Crider" <[email protected]> wrote in message
    news:[email protected]...
    Yup, get fresh connection from the db connection pool,
    and close it
    >when
    I'm done. The logs don't indicate that I've ever exhausted the
    connection pool.
    It's interesting to note these problems are occurring on
    Solaris with
    Oracle OCI connections. Running the same code under Linux with thin
    driver connections works just fine.
    Weird. Do you obtain database connection from a
    datasource and close
    >it
    every time
    you use it?
    Greg Crider <[email protected]> wrote:
    Okay, this appears to be the offending thread. As it
    turns out, the
    >same
    behavior as first described in my initial post, is
    occurring this
    >time
    in the
    business method of the entity bean, as opposed to the
    finder. The
    getNextURL() is the business method in this case. I am using BMP, and
    the
    ejbLoad() and ejbStore() methods are not throwing any
    SQLExceptions.
    Also, I
    don't see anything in the error logs that indicate a
    EJB transaction
    failure.
    This being the case, why would an Oracle rollback be
    attempted? Am I
    misinterpretting this stack trace?
    "ExecuteThread-67" daemon prio=5 tid=0x14e300 nid=0x51 runnable
    [0xe7880000..0xe7881a30]
    at oracle.jdbc.oci8.OCIDBAccess.do_rollback(Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.rollback(OCIDBAccess.java:417)
    at
    oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:510)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.cleanup(ConnectionEnv.java:4
    >99
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Conne
    ctionEnv.java:4
    >17
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Conne
    ctionEnv.java:3
    >93
    at weblogic.jdbcbase.jts.Connection.close(Connection.java:274)
    at weblogic.jdbcbase.jts.Connection.commit(Connection.java:530)
    at
    weblogic.jdbcbase.jts.TxConnection.commitOnePhase(TxConnec
    tion.java:55)
    at
    weblogic.jts.internal.CoordinatorImpl.commitSecondPhase(CoordinatorImpl.
    >ja
    va:484)
    at
    weblogic.jts.internal.CoordinatorImpl.commit(CoordinatorIm
    pl.java:383)
    at weblogic.jts.internal.TxContext.commit(TxContext.java:255)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeOurTx(StatefulEJBObjec
    >t.
    java:320)
    at
    weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObje
    ct.java:845)
    at
    com.pi.speechport.ETO.LoadShare.ETOLoadShareEJBEOImpl.getNextURL(ETOLoad
    >Sh
    areEJBEOImpl.java:114)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionBusin
    ess.getVendorUR
    >L(
    ETOTranscriptionBusiness.java:146)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionBusin
    ess.transcribe(
    >ET
    OTranscriptionBusiness.java:193)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionEJBEO
    Impl.transcribe
    >(E
    TOTranscriptionEJBEOImpl.java:188)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionEJBEO
    Impl_WLSkel.inv
    >ok
    e(ETOTranscriptionEJBEOImpl_WLSkel.java:223)
    at
    weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(B
    asicServerObjec
    >tA
    dapter.java:347)
    at
    weblogic.rmi.extensions.BasicRequestHandler.handleRequest
    (BasicRequestHa
    >nd
    ler.java:86)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicEx
    ecuteRequest.ja
    >va
    :15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    Dimitri Rakitine wrote:
    Make a thread dump during these 60 seconds to see
    what server is
    >doing.
    Greg Crider <[email protected]> wrote:
    I am running WLS5.1 with SP10. I have a stateless
    EJB that gets a
    read-write BMP entity EJB. My test client that executes the
    stateless
    session bean periodically encounters long delays (60
    seconds or
    >more)
    when acquiring the entity bean using its finder
    method. Logging
    >shows
    the finder method is executing properly, and
    typically takes 180 ms
    >to
    locate the entity bean; however, from the stateless
    session beans
    side,
    it appears to take 60 seconds. The test client is
    only a single
    thread,
    so I know the pool is not depleted, or anything like that.
    Something
    appears to be going haywire with the container.
    Does anybody have an idea what might be going on?
    Thanks.
    Greg
    Dimitri
    Greg
    >__
    GREGORY K. CRIDER, Emerging Digital Concepts
    Systems Integration/Enterprise Solutions/Web &
    Telephony Integration
    (e-mail) [email protected]
    (web) http://www.EmergingDigital.com
    (voicemail) 866-474-4147
    (phone) 703-335-0974
    (cell) 703-851-5073
    (fax) 703-365-0223

  • Clustering read-only bean-managed entity ejbs

              I'm designing a data caching approach that relies on using read-only entity ejbs with bean-managed persistence. My design is based on the fact that WebLogic blocks on entity bean access by concurrent users for a given bean instance (unique primary key). I would like to keep only one entity bean instance active(timeoutSetting=0) for eacy primary key for all users to share. That way I only have to hit the database one time to initially populate data in the entity bean. I'm worried about this approach in a WebLogic clustered environment. From reading notes in this newsgroup and other doc, it appears that WebLogic might not use one instance of the entity bean (based upon unique primary key) in a clustered environment. Is that true (that being multiple users could get their own instance of the entity bean with the same primary key)?
              Thanks,
              Bryan
              

    Typically, the read-write EJBs are on each WL server instance, so there is
              no remote invocation -- it is all done by reference.
              Cameron Purdy
              Tangosol, Inc.
              http://www.tangosol.com
              +1.617.623.5782
              WebLogic Consulting Available
              "Bryan Dixon" <[email protected]> wrote in message
              news:[email protected]...
              >
              > I guess I'm confused about read-write (not read-only) entity beans being
              pinned or not. This is from WebLogic 5.1 EJB doc:
              > "read-write entity EJBs do not use a clustered EJBObject stub; a client's
              method calls to a particular EJB always go to a single WebLogic Server
              instance. If the server that a client is using fails, the client must
              re-find the entity EJB using the cluster-aware home stub."
              >
              > Doesn't that mean the entity bean instance for a primary key is pinned to
              a single WebLogic Server instance? Maybe I'm just misunderstanding
              terminology about what a "particular EJB" is - I was thinking it is an
              entity bean instance for a unique primary key.
              >
              > Thanks,
              > Bryan
              >
              >
              > "Cameron Purdy" <[email protected]> wrote:
              > >>I was thinking that read-write entity beans were pinned.
              > >
              > >Not unless you pin them. Basically, that means that the JAR/XML that
              > >contains/specifies the EJB only is on one server.
              > >
              > >> So if two separate weblogic instances in a cluster did a find on an
              entity
              > >ejb with the same primary key and then performed some business method on
              > >that entity ejb, would there really be two separate bean instances in
              each
              > >weblogic instance for the same primary key?
              > >
              > >If it is not pinned, yes.
              > >
              > >--
              > >Cameron Purdy
              > >Tangosol, Inc.
              > >http://www.tangosol.com
              > >+1.617.623.5782
              > >WebLogic Consulting Available
              > >
              > >
              > >"Bryan Dixon" <[email protected]> wrote in message
              > >news:[email protected]...
              > >>
              > >> Toa, thanks again.
              > >>
              > >> There are a couple of things I'm not clear about though. One is that I
              > >want one instance of an entity bean per primary key, not a singleton of
              the
              > >entity bean itself. How would JNDI in a clustered environment help me
              > >there?
              > >>
              > >> The other question I have is about having multiple instances of an
              entity
              > >bean for the same primary key in the cluster. I was thinking that
              > >read-write entity beans were pinned. So if two separate weblogic
              instances
              > >in a cluster did a find on an entity ejb with the same primary key and
              then
              > >performed some business method on that entity ejb, would there really be
              two
              > >separate bean instances in each weblogic instance for the same primary
              key?
              > >>
              > >> Thanks again,
              > >> Bryan
              > >>
              > >> "Tao Zhang" <[email protected]> wrote:
              > >> >
              > >> >"Bryan Dixon" <[email protected]> wrote:
              > >> >>
              > >> >>The reason I was wanting one instance per primary key is that I want
              to
              > >use this entity bean to cache some data from database tables. This data
              > >doesn't change frequently, so we were wanting to get it from this entity
              > >bean's memory instead of constantly hitting the database. This data is
              > >global to all users, so we don't want to store it in stateful session
              beans.
              > >> >>
              > >> >>After reading more about the read-only cache-strategy it doesn't
              appear
              > >that any sycnhronization will occur if the entity bean for a given
              primary
              > >key is updated (state data is updated) in one weblogic instance, that
              change
              > >will not get synced up with other weblogic instances for that same
              primary
              > >key. Is that correct?
              > >> >>
              > >> >It's correct. If you do want to have exact one copy in the cluster.
              You
              > >can read Using JNDI in cluster environment.
              > >> >
              > >> >>If I deploy this entity bean with read-write cache-strategy the
              WebLogic
              > >doc reads as if I will get one instance per primary key that is pinned to
              > >one WebLogic instance and I won't get any fail-over or load-balancing on
              the
              > >ejbObject (the entity bean instance). Did I read this correctly? If
              that
              > >is the case, what is the advantage of setting up read-write entity beans
              to
              > >be clusterable - just the Home objects? I definitely could be
              > >misunderstanding something in the doc since I'm very new to clustering.
              > >> "Tao
              > >> >Zhang"
              > >> ><[email protected]> wrote:
              > >> >>>
              > >> >
              > >> >It's not only instance in the cluster. Probably many instances.
              > >> >
              > >> >If you use 2 tier clustering, failover will not happen because of
              > >co-location. But if you use 3 tier cluster, you can write the special
              code
              > >in the client side to do failover and load-balance.
              > >> >
              > >> >In a 2 tier cluster, actually the ejb load balancing and failover is
              > >almost useless.
              > >> >
              > >> >But in 3 tier, you can use it.
              > >> >
              > >> >Hope this help.
              > >> >
              > >> >
              > >> >
              > >> >>>"Bryan Dixon" <[email protected]> wrote:
              > >> >>>>
              > >> >>>>Thanks Tao.
              > >> >>>>
              > >> >>>>A couple more questions...
              > >> >>>>I was planning deploying this entity bean with the read-only
              > >cache-strategy which means our transaction attribute would be
              > >TXN_NOT_SUPPORTED. Also, our db isolation is TRANSACTION_READ_COMMITTED.
              > >> >>>>
              > >> >>>>Based upon how I was planning on deploying this entity bean, would
              > >WebLogic create an instance of the bean for each primary key in each
              > >cluster? I'm just trying to figure out how many duplicate bean instances
              > >for the primary key I could have across all clusters. I was really just
              > >wanting one instance that is shared among all clients and was hoping that
              > >the clustering would provide me with fail-over if that one cluster went
              > >down.
              > >> >>>>
              > >> >>>If you use 3 tier cluster structure, it's impossible to know how
              many
              > >instances of ejb with the same primary key. Probably one instance for
              each
              > >wls instance.
              > >> >>>In wls5.1, it's impossible to host only read only entity bean
              instance
              > >in the 3-tier cluster. Because read only entity bean are clusterable in
              both
              > >home and remote interface.
              > >> >>>
              > >> >>>>Regarding making the bean a pinned service, which it sounds like I
              > >might have to do to get the results I want, how do I do that? Is that a
              > >deployment descriptor setting? Also, if I make it a pinned service, do I
              > >get any fail-over suport by clustering the bean?
              > >> >>>>
              > >> >>>For the pinned service, you can just deployed on one or several
              server
              > >instances. The per-server properties file is a good place to put the
              > >weblogic.ejb.deploy property. If only one pinned service in the cluster,
              you
              > >can't get fail over. If the that server instance fails, the home stub
              will
              > >be removed from the jndi in other server instances.
              > >> >>>
              > >> >>>Why do you must need only one instance in the cluster? Do you want
              > >exact-only-copy? You can read Using JNDI doc about its in cluster
              > >environment.
              > >> >>>
              > >> >>>
              > >> >>>
              > >> >>>
              > >> >>>>Thanks again,
              > >> >>>>Bryan
              > >> >>>>
              > >> >>>>
              > >> >>>>
              > >> >>>>"Tao Zhang" <[email protected]> wrote:
              > >> >>>>>
              > >> >>>>>
              > >> >>>>>Bryan Dixon <[email protected]> wrote in message
              > >> >>>>>news:[email protected]...
              > >> >>>>>>
              > >> >>>>>> I'm designing a data caching approach that relies on using
              > >read-only
              > >> >>>>>entity ejbs with bean-managed persistence. My design is based on
              the
              > >fact
              > >> >>>>>that WebLogic blocks on entity bean access by concurrent users for
              a
              > >given
              > >> >>>>>bean instance (unique primary key). I would like to keep only one
              > >entity
              > >> >>>>>bean instance active(timeoutSetting=0) for eacy primary key for
              all
              > >users to
              > >> >>>>>share. That way I only have to hit the database one time to
              > >initially
              > >> >>>>>populate data in the entity bean. I'm worried about this approach
              in
              > >a
              > >> >>>>>WebLogic clustered environment. From reading notes in this
              newsgroup
              > >and
              > >> >>>>>other doc, it appears that WebLogic might not use one instance of
              the
              > >entity
              > >> >>>>>bean (based upon unique primary key) in a clustered environment.
              Is
              > >that
              > >> >>>>>true (that being multiple users could get their own instance of
              the
              > >entity
              > >> >>>>>bean with the same primary key)?
              > >> >>>>>>
              > >> >>>>>
              > >> >>>>>
              > >> >>>>>It's true. In a cluster environment, each wls instance can have
              their
              > >ejb
              > >> >>>>>instance. The block of concurrent access to the ejb data is up to
              > >your
              > >> >>>>>transaction attribute and isolation level and your database.
              > >> >>>>>
              > >> >>>>>If you only want to keep one instance active, you can make the
              > >read-only
              > >> >>>>>entity bean a pinned service, to be deployed in one instance. But
              the
              > >> >>>>>network overhead is worse.
              > >> >>>>>
              > >> >>>>>
              > >> >>>>>> Thanks,
              > >> >>>>>> Bryan
              > >> >>>>>
              > >> >>>>>
              > >> >>>>
              > >> >>>
              > >> >>
              > >> >
              > >>
              > >
              > >
              >
              

  • InitialContext() in EJB1.1, WLS5.1

    [I posted this on ...interest.ejb and realized that I might get
    a more knowledgeable response here.]
    In WLS5.1, I'd like to get the name of some bean-specific
    environment variables. I know that I'm supposed to do something
    like so:
    InitialContext ic = new InitialContext();
    String s = (String)ic.lookup("java:/comp/env/MyEnv");
    I get that much. What I would like to do is put this call into
    a static method in a utilities-oriented class like so:
    class MyUtils {
    static Object getEnvVal(String envName) {
    InitialContext ic = new InitialContext();
    return ic.lookup("java:/comp/env/" + envName);
    So my question is, can InitialContext() be called in a static method?
    If not, then that makes sense given how I interpret the spec EJB1.1
    14.2.1.2.
    But if so, then how do I distinquish between one bean's environment
    value versus another's when both beans are deployed in the same
    descriptor?
    e.g., in bean1, String s = (String)MyUtils.getEnvValue("MyEnv");
    vs in bean2, String s = (String)MyUtils.getEnvValue("MyEnv");
    Gary F.
    FastTrack Systems, Inc

    When you say it 'worked on 6.0 SP2', do you mean the bean with the
    Vector field actually runs
    on 6.0 SP2 (and you can store and retrieve Vector values), or that it
    just passes ejbc?
    Complex Serializable object types, like Vector, have never been
    supported in CMP 1.1, as far
    as I know, but we probably didn't add a compliance check until 6.1.
    Our EJB 2.0 CMP supports Vector and other complex object types.
    Also, please don't cross post.
    Seth
    Anup Vachali wrote:
    Kumar,
    Thanks for the reply. It worked for me on WLS6.0SP2!! and it is
    complaining about Vector not being a valid data type in EJB CMP 1.1. I
    have been looking at the specifications and cannot find anyplace where
    it says that Vector is not allowed.
    Anup.
    Kumar Allamraju wrote:
    Vector is not a valid CMP data type in 60 & 61
    I declared a cmp field of type Vector and in both
    versions ejbc says that "vector is not a valid CMP type"
    Check the following
    http://e-docs.bea.com/wls/docs60/ejb/cmp.html#1059575
    http://e-docs.bea.com/wls/docs61/ejb/cmp.html#1059575
    Kumar
    Rob Woollen wrote:
    I believe it's a WebLogic problem. If your bean worked in WLS 6.0,
    it should work in 6.1. Please open a case with [email protected]
    -- Rob
    Anup Vachali wrote:
    List:
    When I try to do an ejbc on a bean which has a cmp field of class
    Vector
    I get the following error:
    ERROR: Error from ejbc: In EJB EventLevelEHome, cmp-field: event
    is
    declared to
    be of Class: java.util.Vector, which is not supported in WebLogic
    EJB
    CMP 1.1
    ERROR: ejbc found errors
    This happened when I upgraded from WebLogic6.0SP2 to WebLogic6.1
    and it
    was working fine in WL6.0.
    Does anyone know if this is a WebLogic problem or an EJB spec
    limitation? It seems to be a weblogic problem since I could get
    it to
    work on WebLogic6.
    Thanks for any help.
    Anup--
    AVAILABLE NOW!: Building J2EE Applications & BEA WebLogic Server
    by Michael Girdley, Rob Woollen, and Sandra Emerson
    http://learnWebLogic.com
    [att1.html]

  • Error while deploying a message driven bean

    I am deployeing a MDB which is done successfully but the message is not retrieved(No message in teh queue). The following description is given in the log file.
    #1.5#0016E6197593004B0000000B000013040004288DE20D6CD8#1170489754872#com.sap.security.core.policy.PolicyInfoManagerImpl##com.sap.security.core.policy.PolicyInfoManagerImpl.copyApplicationConfiguration#Administrator#523####e5dbec01b35c11db90e70016e6197593#SAPEngine_Application_Thread[impl:3]_39##0#0#Error#1#/System/Security/WS/SecurityProtocol#Java###An error occured while copying configurations for application . Reason: #3#sap.com/MessageEAR#com.sap.engine.frame.core.configuration.NameNotFoundException#A configuration with the path "webservices/services/sap.com/MessageEAR" does not exist.#
    Can you please tell where to look for it and what to do?

    the session bean is ::
    public class SenderBean implements SessionBean {
      public static final boolean DEBUG = false;
      private SessionContext ctx;
      private TopicConnectionFactory factory;
      private TopicConnection connection;
      private Topic topic;
      public SenderBean() {
         log("constructor");
      public void ejbCreateSender() throws CreateException {
         log("ejbCreate");
                try {
                   InitialContext naming = new InitialContext();
                   factory = (TopicConnectionFactory)naming.lookup("jmsfactory/default/ExceptionTopicFactory");
                   topic = (Topic)naming.lookup("jmstopics/default/ExceptionTopic");
                   log("factory: " + factory);
                   allocateResources();
                } catch (Exception exc) {
                   log("exception occured during ejbCreate().");
                   throw new CreateException("Unexpected exception in ejbCreate().");
      public void ejbCreate() throws CreateException {
      public void ejbActivate() {
         log("ejbActivate");
         try {
           allocateResources();
         } catch (Exception exc) {
           exc.printStackTrace();
      public void ejbPassivate() {
         log("ejbPassivate");
         try {
           releaseResources();
         } catch (Exception exc) {
           exc.printStackTrace();
      public void ejbRemove() {
         log("ejbRemove");
      public void setSessionContext(SessionContext _ctx) {
         log("setSessionContext");
         ctx = _ctx;
      public void sendMessage(String text) throws MessageNotSentException {
         log("sendMessage");
         log("text = " + text);
         TopicSession session = null;
         try {
           session = connection.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
           log("topic = " + topic);
           TopicPublisher publisher = session.createPublisher(topic);
           TextMessage textMessage = session.createTextMessage();
           textMessage.setText(text);
           publisher.publish(textMessage);
           System.out.println("Message Sent");
           log("message sent");
         } catch (JMSException jmse) {
           jmse.printStackTrace();
           throw new MessageNotSentException(jmse.toString());
         } finally {
           try {
              if (session != null) {
                session.close();
           } catch (Exception exc) {
      private void releaseResources() throws JMSException {
         connection.close();
         connection = null;
      private void allocateResources() throws JMSException {
         connection = factory.createTopicConnection();
         log("connection = " + connection);
         connection.start();
         log("connection started");
      private void log(String message) {
         if (DEBUG) {
           System.out.println("SenderBean: " + message);
    the mdb is::
    public class MessageDisplayBean implements MessageDrivenBean, MessageListener {
           public static final boolean DEBUG = false;
           private MessageDrivenContext ctx;
           private QueueConnectionFactory factory;
           private QueueConnection connection;
           private Queue queue;
           public MessageDisplayBean() {
              System.out.println("In constructor");
              log("constructor");
           public void onMessage(Message message) {
              TextMessage textMessage = (TextMessage)message;
              try {
                String text = textMessage.getText();
                log("message received. Text follows:\n\n  " + text + "\n\n");
                connection = factory.createQueueConnection();
                connection.start();
                QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
                TextMessage confirmation = session.createTextMessage();
                confirmation.setText("Message \""+ textMessage.getText() + "\" received.");
                //queue = session.createQueue("ConfirmationQueue");
                QueueSender sender = session.createSender(queue);
                sender.send(confirmation);
                session.close();
                connection.close();
                System.out.println("Message received");
              } catch (javax.jms.JMSException jmse) {
           public void ejbRemove() {
              log("ejbRemove()");
           public void setMessageDrivenContext(MessageDrivenContext _ctx) {
              log("setMessageDrivenContext()");
              ctx = _ctx;
              System.out.println("In context");
           public void ejbCreate() {
              try {
                   System.out.println("In ejbcreate");
                InitialContext naming = new InitialContext();
                factory = (QueueConnectionFactory)naming.lookup("jmsfactory/default/ExceptionQueueFactory");
                queue = (Queue)naming.lookup("jmsqueues/default/ExceptionQueue");
                log("factory: " + factory);
              } catch (Exception exc) {
                log("exception occured during ejbCreate().");
              log("ejbCreate()");
           private void log(String str) {
              if (DEBUG) {
                System.out.println("MessageDisplayBean: " + str);
    th ejb-j2ee-engine.xml is::
    <ejb-j2ee-engine>
         <enterprise-beans>
              <enterprise-bean>
                   <ejb-name>MessageDisplayBean</ejb-name>
                   <jndi-name>MessageDisplayBean</jndi-name>
                   <message-props>
                        <destination-name>ExceptionTopic</destination-name>
                        <connection-factory-name>ExceptionTopicFactory</connection-factory-name>
                   </message-props>
              </enterprise-bean>
              <enterprise-bean>
                   <ejb-name>MessageSender</ejb-name>
                   <jndi-name>MessageSender</jndi-name>
                   <session-props/>
              </enterprise-bean>
                   </enterprise-beans>
    </ejb-j2ee-engine>
    the ejb-jar.xml is::
                 <ejb-jar>
        <display-name>        Message Driver Bean Example      </display-name>
        <enterprise-beans>
            <session>
                <display-name>            MessageSender          </display-name>
                <ejb-name>MessageSender</ejb-name>
                <home>com.sap.message.sender.SenderHome</home>
                <remote>com.sap.message.sender.Sender</remote>
                <local-home>com.sap.message.sender.SenderLocalHome</local-home>
                <local>com.sap.message.sender.SenderLocal</local>
                <ejb-class>com.sap.message.sender.SenderBean</ejb-class>
                <session-type>Stateful</session-type>
                <transaction-type>Container</transaction-type>
                <ejb-local-ref>
                    <ejb-ref-name>ejb/SenderBean</ejb-ref-name>
                    <ejb-ref-type>Session</ejb-ref-type>
                    <local-home>com.sap.message.sender.SenderLocalHome</local-home>
                    <local>com.sap.message.sender.SenderLocal</local>
                    <ejb-link>MyEJB.jar#MessageSender</ejb-link>
                </ejb-local-ref>
                <resource-ref>
                    <res-ref-name>ExceptionTopicFactory</res-ref-name>
                    <res-type>javax.jms.TopicConnectionFactory</res-type>
                    <res-auth> Container</res-auth>
                </resource-ref>
                <resource-env-ref>
                    <resource-env-ref-name>ExceptionTopic        </resource-env-ref-name>
                    <resource-env-ref-type>   javax.jms.Topic        </resource-env-ref-type>
                </resource-env-ref>
            </session>
            <message-driven>
                <ejb-name>MessageDisplayBean</ejb-name>
                <ejb-class>com.sap.message.mdb.MessageDisplayBean</ejb-class>
                <transaction-type>Container</transaction-type>
                <message-driven-destination>
                    <destination-type>javax.jms.Topic</destination-type>
                </message-driven-destination>
                <resource-ref>
                    <res-ref-name>   ExceptionQueueFactory            </res-ref-name>
                    <res-type>              javax.jms.QueueConnectionFactory            </res-type>
                    <res-auth>              Container            </res-auth>
                </resource-ref>
                <resource-env-ref>
                    <resource-env-ref-name>        ExceptionQueue        </resource-env-ref-name>
                    <resource-env-ref-type>          javax.jms.Queue        </resource-env-ref-type>
                </resource-env-ref>
            </message-driven>
               </enterprise-beans>
        <assembly-descriptor>
            <container-transaction>
                <method>
                    <ejb-name>MessageDisplayBean</ejb-name>
                    <method-name>onMessage</method-name>
                </method>
                          <trans-attribute>           NotSupported         </trans-attribute>
            </container-transaction>
        </assembly-descriptor>
    </ejb-jar>

  • .v2.XMLParseException:Can not find definition for element 'descriptor'

    I am getting the following error, while running 'empps.jsp' ...when executing the tutorial given at
    ERROR Details:
    500 Internal Server Error
    javax.servlet.jsp.JspException: javax.faces.el.EvaluationException: Error getting property 'employees' from bean of type jsftoplink.model.EmployeesClient: Exception [TOPLINK-25004] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.exceptions.XMLMarshalExceptionException Description: An error occurred unmarshalling the documentInternal Exception: Exception [TOPLINK-27101] (Oracle TopLink - 10g Release 3 (10.1.3.1.0) (Build 061004)): oracle.toplink.platform.xml.XMLPlatformExceptionException Description: An error occurred while parsing the document.Internal Exception: oracle.xml.parser.v2.XMLParseException: Can not find definition for element 'class-descriptor-type'     at com.sun.faces.taglib.html_basic.DataTableTag.doEndTag(DataTableTag.java:501)     at emps.jspService(_emps.java:629)
    Pls help me in resolving this issue.

    I am still gettng the same error. The xml file is now
    <?xml version="1.0" encoding="UTF-8"?>
    <CUSTOMER xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="" ID="568945">
    <FIRSTNAME>Arnold</FIRSTNAME>
    <LASTNAME>McEriccson</LASTNAME>
    <ADDRESS>
    <LINE1>31, Nomadic Avevnue</LINE1>
    <LINE2>Pasadena Clove</LINE2>
    <CITY>WoolTown, MT</CITY>
    <ZIP>45263</ZIP>
    </ADDRESS>
    <BIRTHDATE>1967-08-13</BIRTHDATE>
    </CUSTOMER>
    The xsd file is:
    <?xml version="1.0" encoding="UTF-8"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="CUSTOMER">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="FIRSTNAME" type="xs:string"/> <xs:element name="LASTNAME" type="xs:string"/> <xs:element name="ADDRESS"> <xs:complexType>
    <xs:sequence>
    <xs:element name="LINE1" type="xs:string"/> <xs:element name="LINE2" type="xs:string"/> <xs:element name="CITY"/>
    <xs:element name="ZIP" type="xs:int"/> </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name="BIRTHDATE" type="xs:date"/> </xs:sequence>
    <xs:attribute name="ID" type="xs:double"/> </xs:complexType>
    </xs:element>
    </xs:schema>
    There seems to be something fairly obvious that i am missing.

  • How to transaction in the message driven bean?

              hello
              i write a message driven bean,that monitor the weblogic message queue,when a "Order"
              object is witten to the queue,the mdb get it and write it to a entity bean "Orderinfo".all
              of above logic is within the "onMessage" method of the mdb.
              i want to encapsulate the flow in a transaction,see my code snippet of the onMessage
              method:
              ObjectMessage objMsg = (ObjectMessage) msg;
              OrderVO orderVO = (OrderVO) objMsg.getObject();
              System.out.println(orderVO.booklist);
              OrderinfoHome orderinfoHome = (OrderinfoHome) ctx.lookup(
              "java:/comp/env/orderinfo");
              Orderinfo orderinfo = orderinfoHome.create(orderVO.orderID);
              orderinfo.setAddress(orderVO.address);
              orderinfo.setCustname(orderVO.custName);
              orderinfo.setEmail(orderVO.email);
              orderinfo.setBooklist(orderVO.booklist);
              orderinfo.setPrice(new BigDecimal(orderVO.price));
              and deploy descriptor snippet(ejb-jar.xml):
              <assembly-descriptor>
              <container-transaction>
              <method>
              <ejb-name>orderMDB</ejb-name>
              <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
              </assembly-descriptor>
              i think during this transaction,there are two action:geting the object from the
              queue and saving it to entity bean.in order to test the transaction,i modify the
              jndi name of entity bean in the code to a WRONG one.redeploy my program,and send
              a message to the queue,the mdb is activated,then the exception is thrown because
              of the wrong jndi name.after that,i check the message queue,find that it is empty.why?i
              think if the second action of the transaction is fail,the transaction should roll
              back,the message should be send BACK to the queue.
              i also ty to use the "javax.transaction.UserTransaction" in the onMessage method,but
              the follwing exception is thrown:
              javax.transaction.NotSupportedException: Another transaction is associated with
              this thread.................................
              who can help me,if any wrong with me,and how to use the transaction with the message
              driven bean?
              thank you.
              

    The transaction should rollback if the MDB throws an
              exception. Try changing your MDB code to
              call "setRollbackOnly()" on the EJB
              context (instead of throwing an exception) to see
              if that works. If calling "setRollbackOnly()" fixes
              the problem - then please contact customer support
              and report a bug.
              zbcong wrote:
              > hello
              >
              > i write a message driven bean,that monitor the weblogic message queue,when a "Order"
              > object is witten to the queue,the mdb get it and write it to a entity bean "Orderinfo".all
              > of above logic is within the "onMessage" method of the mdb.
              > i want to encapsulate the flow in a transaction,see my code snippet of the onMessage
              > method:
              >
              >
              > ObjectMessage objMsg = (ObjectMessage) msg;
              > OrderVO orderVO = (OrderVO) objMsg.getObject();
              > System.out.println(orderVO.booklist);
              > OrderinfoHome orderinfoHome = (OrderinfoHome) ctx.lookup(
              > "java:/comp/env/orderinfo");
              > Orderinfo orderinfo = orderinfoHome.create(orderVO.orderID);
              > orderinfo.setAddress(orderVO.address);
              > orderinfo.setCustname(orderVO.custName);
              > orderinfo.setEmail(orderVO.email);
              > orderinfo.setBooklist(orderVO.booklist);
              > orderinfo.setPrice(new BigDecimal(orderVO.price));
              >
              >
              > and deploy descriptor snippet(ejb-jar.xml):
              >
              >
              > <assembly-descriptor>
              > ............
              > ...........
              >
              > <container-transaction>
              > <method>
              > <ejb-name>orderMDB</ejb-name>
              > <method-name>*</method-name>
              > </method>
              > <trans-attribute>Required</trans-attribute>
              > </container-transaction>
              > </assembly-descriptor>
              >
              >
              > i think during this transaction,there are two action:geting the object from the
              > queue and saving it to entity bean.in order to test the transaction,i modify the
              > jndi name of entity bean in the code to a WRONG one.redeploy my program,and send
              > a message to the queue,the mdb is activated,then the exception is thrown because
              > of the wrong jndi name.after that,i check the message queue,find that it is empty.why?i
              > think if the second action of the transaction is fail,the transaction should roll
              > back,the message should be send BACK to the queue.
              >
              > i also ty to use the "javax.transaction.UserTransaction" in the onMessage method,but
              > the follwing exception is thrown:
              >
              > javax.transaction.NotSupportedException: Another transaction is associated with
              > this thread.................................
              >
              > who can help me,if any wrong with me,and how to use the transaction with the message
              > driven bean?
              >
              > thank you.
              >
              >
              

Maybe you are looking for

  • Trouble Opening Illustrator and Photoshop CS2??

    When opening Adobe Illustrator CS2 I receive a Windows Box showing Adobe Illustrator: Illustrator.exe - Application Error The instruction at "0x003c197d" referenced memory at "0x000000000". The memory could not be "read". Click on OK to terminate the

  • How can i watch movies in safari on my tv?!?!?!?!

    ok so i have a website that is for movies but i cant get it to play on my xbox internet explorer but it will play just fine on my iphone 4s but i dont have appletv or any other fancy gadgets just a samsung plasma. is their any way i can get these mov

  • Best RAID configuration for storing Datafiles and Redo log files

    Database version:10gR2 OS version: Solaris Whis is the best RAID level for storing Datafiles and Redo log files?

  • Pattern Matching problems

    Hi people, I'm having a slight problem with pattern matching. What I need to do is find if my pattern is a given string an return the end index. Here's my string: <TD>Some text</TD> I need to find everything between the 2 anchor tags. (In this case "

  • What exactly does getColumnCount() mean?

    Calling getColumnCount() on JTable and TableColumnModel returns the number of columns being displayed. On the other hand, TableModel's getColumnCount(), if I'm correct, should return the number of columns actually in the data. My question is, if I ha