Conflict of weblogic with jaas.jar

Hi there,
I am using weblogic6.0+sp1 for JAAS simple and SSL authentication. Sun's
implementation class com.sun.security.auth.login.ConfigFile in jaas.jar
is conflict with the Config class I implemented that extends
Configuration to parse the login policy file and return the array of
AppConfigurationEntry. If this jaas.jar gets picked up before
weblogic.jar (For some jdk version, this jar is put under the jdk's
lib/ext directory) the sun's implementation will be picked up instead of
mine and this will results in failure. I am wandering if this is a bug
or not?
Thanks,
Cathy

This has nothing to do with the class name, since both my implementation and
sun's are subclass of Configuration class. Runtime, it will pick up sun's if
jaas.jar is put in front of weblogic.jar.
Hellen Andersen wrote:
An aside related question: isn't jaas.jar always installed in lib/ext?
Otherwise, couldn't you rename your ConfigFile class so it doesn't match
Sun's?
"Cathy Wei" <[email protected]> wrote in message
news:[email protected]..
Hi there,
I am using weblogic6.0+sp1 for JAAS simple and SSL authentication. Sun's
implementation class com.sun.security.auth.login.ConfigFile in jaas.jar
is conflict with the Config class I implemented that extends
Configuration to parse the login policy file and return the array of
AppConfigurationEntry. If this jaas.jar gets picked up before
weblogic.jar (For some jdk version, this jar is put under the jdk's
lib/ext directory) the sun's implementation will be picked up instead of
mine and this will results in failure. I am wandering if this is a bug
or not?
Thanks,
Cathy

Similar Messages

  • Jaas.jar conflict in Weblogic 6.1 cluster

    We are using a Custom realm for Weblogic which communicates with Tivoli Policy
    director for user authentication and authorization.
    For communicating with PolicyDirector, We need to have IBM's jaas.jar as a JDK
    extension(in jre/lib/ext directory)along with some more jar files.We never had
    problems when running Weblogic in stand alone mode.But when we are trying to run
    Weblogic as a cluster, Managed Server is not able to communicate with Admin Server
    giving following exception:
    Starting WebLogic Server ....
    Connecting to http://166.57.31.66:8101...
    <Feb 7, 2002 1:52:26 PM EST> <Info> <Logging> <FileLogger Opened.>
    <Feb 7, 2002 1:52:27 PM EST> <Info> <Posix Performance Pack> <System has file
    descriptor limits of - soft: '1024', hard: '1024'>
    <Feb 7, 2002 1:52:27 PM EST> <Info> <Posix Performance Pack> <Using effective
    file descriptor limit of: '1024' open sockets/files.>
    <Feb 7, 2002 1:52:27 PM EST> <Info> <Posix Performance Pack> <Allocating: '3'
    POSIX reader threads>
    <Feb 7, 2002 1:52:28 PM EST> <Emergency> <Configuration Management> <Errors detected
    attempting to connect to admin server at 166.57.31.66:8101 during initialization
    of managed server ( 166.57.31.69:8001 ). The reported error was: < null > This
    condition generally results when the managed and admin servers are using the same
    listen address and port.>
    <Feb 7, 2002 1:52:28 PM EST> <Emergency> <Server> <Unable to initialize the server:
    'Fatal initialization exception
    Throwable: weblogic.management.configuration.ConfigurationException - with nested
    exception:
    [javax.naming.AuthenticationException [Root exception is java.lang.SecurityException:
    attempting to add an object which is not an instance of java.security.Principal
    to a Subject's Principal Set]]
    javax.naming.AuthenticationException. Root exception is java.lang.SecurityException:
    attempting to add an object which is not an instance of java.security.Principal
    to a Subject's Principal Set
         at javax.security.auth.Subject$SecureSet.add(d:/jn130-userlvl/src/classes/sov/javax/security/auth/Subject.java:1098)
         at weblogic.common.internal.BootServicesStub.writeUserInfoToSubject(BootServicesStub.java:72)
         at weblogic.common.internal.BootServicesStub.authenticate(BootServicesStub.java:80)
         at weblogic.security.acl.internal.Security.authenticate(Security.java:108)
         at weblogic.jndi.WLInitialContextFactoryDelegate.pushUser(WLInitialContextFactoryDelegate.java:509)
         at weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialContextFactoryDelegate.java:364)
         at weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialContextFactoryDelegate.java:336)
         at weblogic.jndi.Environment.getContext(Environment.java:156)
         at weblogic.jndi.Environment.getInitialContext(Environment.java:139)
         at weblogic.management.Admin.initializeRemoteAdminHome(Admin.java:950)
         at weblogic.management.Admin.start(Admin.java:351)
         at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:372)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:202)
         at weblogic.Server.main(Server.java:35)
    --------------- nested within: ------------------
    weblogic.management.configuration.ConfigurationException - with nested exception:
    [javax.naming.AuthenticationException [Root exception is java.lang.SecurityException:
    attempting to add an object which is not an instance of java.security.Principal
    to a Subject's Principal Set]]
         at weblogic.management.Admin.initializeRemoteAdminHome(Admin.java:959)
         at weblogic.management.Admin.start(Admin.java:351)
         at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:372)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:202)
         at weblogic.Server.main(Server.java:35)
    When we removed IBM's jaas.jar from jdk/jre/lib/ext to check the clustering.It
    works fine.But We need to have jaas.jar for our custom realm.
    Thanks.
    Jagan.

    Hi jerry
    i already got that problem solved by removing jaas.jar file
    from class path.
    i don'nt how it is working with out in classpath...?
    Jerry <[email protected]> wrote:
    Hi Nivas,
    I think that the problem you are seeing has something to do with the
    placement of jaas.jar in your classpath
    On WebLogic server, put jaas.jar in the classpath after weblogic.jar.
    I would bet that you have it placed before weblogic.jar right now.
    I don't think the exception that you're seeing right now has anything
    to do with your weblogic.policy file right now, so I think it is
    safe to not worry about it right now.
    Hope this helps,
    Joe Jerry

  • Problem with weblogic-cmp-rdbms-jar.xml

    While using ANT by apache to create a deployable EAR file for my application i
    created the weblogic-cmp-rdbms-jar.xml file with the following DOCTYPE header
    <!DOCTYPE weblogic-rdbms-bean PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0
    EJB RDBMS20 Persistence//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>
    when i go for ejbc following error is displayed
    [java] ERROR: Error from ejbc: Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'.
    The error was:
    [java] weblogic.xml.process.ProcessorFactoryException: The public id, "-//BEA
    Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS20 Persistence//EN", specified in the
    XML document is invalid. Use one of the following valid public ids:
    [java] "-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB RDBMS Persistence//EN"
    [java] "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB 1.1 RDBMS Persistence//EN"
    [java]
    [java] at weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:239)
    [java] at weblogic.ejb20.cmp11.rdbms.Deployer.parseXMLFile(Deployer.java:293)
    [java] at weblogic.ejb20.cmp11.rdbms.Deployer.readTypeSpecificData(Deployer.java:358)
    [java] at weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.ja
    va:482)
    [java] at weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceType.java:406
    [java] at weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:139)
    [java] at weblogic.ejb20.ejbc.EJB11CMPCompiler.generatePersistenceSources(EJB11CMPCompiler.
    java:61)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:233)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:360)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:79)
    [java] at weblogic.ejbc.main(ejbc.java:21)
    [java]
    [java] ERROR: ejbc found errors
    BUILD FAILED
    i have created the Doctype header after refering to the documentation available
    at http://edocs.bea.com/wls/docs61///////ejb/EJB_reference.html
    please help me as i am not able to find out the exact problem. i have also applied
    the ejb2.0 patch available for 6.0 which is supposed to enable the ejb2.0 related
    features
    Any help will be really appreciated
    thanx in advance
    Daljit

    Are you trying to make an EJB 1.1 CMP bean or an EJB 2.0 CMP bean.
    It looks like you have an EJB 1.1 ejb-jar.xml, but have requested an EJB 2.0 cmp descriptor.
    Take a look at examples/ejb/basic/containerManaged and ejb20/basic/containerManaged for the 2 examples.
    -- Rob
    Daljit Chauhan wrote:
    While using ANT by apache to create a deployable EAR file for my application i
    created the weblogic-cmp-rdbms-jar.xml file with the following DOCTYPE header
    <!DOCTYPE weblogic-rdbms-bean PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 6.0.0
    EJB RDBMS20 Persistence//EN' 'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>
    when i go for ejbc following error is displayed
    [java] ERROR: Error from ejbc: Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'.
    The error was:
    [java] weblogic.xml.process.ProcessorFactoryException: The public id, "-//BEA
    Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS20 Persistence//EN", specified in the
    XML document is invalid. Use one of the following valid public ids:
    [java] "-//BEA Systems, Inc.//DTD WebLogic 5.1.0 EJB RDBMS Persistence//EN"
    [java] "-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB 1.1 RDBMS Persistence//EN"
    [java]
    [java] at weblogic.xml.process.ProcessorFactory.getProcessor(ProcessorFactory.java:239)
    [java] at weblogic.ejb20.cmp11.rdbms.Deployer.parseXMLFile(Deployer.java:293)
    [java] at weblogic.ejb20.cmp11.rdbms.Deployer.readTypeSpecificData(Deployer.java:358)
    [java] at weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(PersistenceType.ja
    va:482)
    [java] at weblogic.ejb20.persistence.PersistenceType.setupDeployer(PersistenceType.java:406
    [java] at weblogic.ejb20.deployer.CMPInfoImpl.setup(CMPInfoImpl.java:139)
    [java] at weblogic.ejb20.ejbc.EJB11CMPCompiler.generatePersistenceSources(EJB11CMPCompiler.
    java:61)
    [java] at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:233)
    [java] at weblogic.ejbc20.runBody(ejbc20.java:360)
    [java] at weblogic.utils.compiler.Tool.run(Tool.java:79)
    [java] at weblogic.ejbc.main(ejbc.java:21)
    [java]
    [java] ERROR: ejbc found errors
    BUILD FAILED
    i have created the Doctype header after refering to the documentation available
    at http://edocs.bea.com/wls/docs61///////ejb/EJB_reference.html
    please help me as i am not able to find out the exact problem. i have also applied
    the ejb2.0 patch available for 6.0 which is supposed to enable the ejb2.0 related
    features
    Any help will be really appreciated
    thanx in advance
    Daljit

  • Problem with protocol.jar with weblogic

    atg10.0.3 and weblogic 11g on 64bit linux.
    I've been plagued by this problem with ATG's protocol jar. While it loads the jar when starting up startWeblogic.sh it does not get loaded when starting a managed server thus i get the following errors:
    **** Error Fri Jun 15 15:56:43 MDT 2012 1339797403444 / Unable to start service "/atg/scenario/ScenarioManager": atg.nucleus.ServiceException: The configuration file XMLFile(/atg/scenario/scenarioManager.xml) could not be read: java.net.MalformedURLException: unknown protocol: dynamosystemresource
    **** Error Fri Jun 15 15:56:43 MDT 2012 1339797403544 /atg/scenario/ScenarioManager Unable to combine messaging information from the process manager component /atg/scenario/ScenarioManager. The process manager has not been classified yet so it cannot be determined if global messages should be listened for. This error indicates a problem with component startup order - the /atg/scenario/ScenarioManager component has been started before the /atg/dynamo/messaging/MessagingManager component
    **** Error Fri Jun 15 15:56:43 MDT 2012 1339797403583 /atg/dynamo/messaging/MessagingManager An exception occurred while trying to parse XML definition file "XMLFile(/atg/dynamo/messaging/dynamoMessagingSystem.xml)" java.net.MalformedURLException: unknown protocol: dynamosystemresource
    Following instructions has led me to place the protocol.jar from DAS/lib to the root of my domain directory and then apply the classpath entry in startWeblogic.sh script. protocol.jar shows up at the top of this scripts SDTOUT. But I cannot seem to get it included in the production.out logs when starting the managed server.
    Any ideas?
    Thanks!
    -Kip

    Yes I figured this out. The problem was the version of weblogic. I was using 1.3.6 when it should have been 1.3.5. After changing out the version, I no longer had problems with protocol.jar.
    Thanks!
    -Kip

  • Problem with JAAS example in WLS6.0sp1

    Hi,
    I tried to run the SampleClient from the JAAS example in WLS6.0sp1 and got an
    exception
    when a valid username/password combination is entered. Has anyone experienced
    that in WLS6.0sp1?
    Thanx
    Ralf
    SampleLoginModule.initialize(), debug enabled
    SampleLoginModule.initialize(), URL t3://localhost:7001
    SampleLoginModule.login(), username guest
    SampleLoginModule.login(), password guest
    Authentication Failed: Unexpected Exception, java.lang.NoSuchMethodError
         at weblogic.security.auth.Authenticate.authenticate(Authenticate.java:124)
         at examples.security.jaas.SampleLoginModule.login(SampleLoginModule.java:157)
         at java.lang.reflect.Method.invoke(Native Method)
         at javax.security.auth.login.LoginContext.invoke(LoginContext.java:595)
         at javax.security.auth.login.LoginContext.access$000(LoginContext.java:125)
         at javax.security.auth.login.LoginContext$3.run(LoginContext.java:531)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.login.LoginContext.invokeModule(LoginContext.java:528)
         at javax.security.auth.login.LoginContext.login(LoginContext.java:449)
         at examples.security.jaas.SampleClient.main(SampleClient.java:92)

    Weblogic comes with its own implementation of JAAS, unfortunately
    conflicting with Sun's. Contact customer support, they will tell you the
    exact differences and incompatibilities. Or reverse engineer the two
    versions, you'll find quite a few differences (apart from the BEA version
    not implementing JAAS authorization, which is documented).
    "Narinder Gaheer" <[email protected]> wrote in message
    news:[email protected]..
    I am happy someone came up with this problem. I also bent backwardssolving
    this problem
    in my application.
    I figured out that as soon as I remove the standard jaas.jar from my
    classpath , I can run the example successfully. Weblogic.jar does contain
    necessary jaas library , so don't need to include jaas.jar.
    I am not sure, but I get the feeling that there is a jaas library conflict
    here. May be weblogic
    guys are the best to put some light on this issue.
    "Ralf Fritsche" <[email protected]> wrote in message
    news:3b15188e$[email protected]..
    I found out, that the example runs with the JDK delivered by BEA,
    but not with a JDK I downloaded from SUN.
    Wheras with the first the provided way to set the user defined
    configuration class with the system property'weblogic.security.jaas.Configuration'
    works, this is not possible with another JDK. According to the
    JAAS standard, this class could only be defined in the properties
    file 'java.security' of the Java runtime.
    How is BEA doing this?
    Thanx
    Ralf

  • Issue with Packaged Jars added to project from resource Palette

    Hello!
    I am using Jdeveloper 11.1.2.2.
    I started this post thinking there was an issue having to do with packaging jars that refer to other libraries (see post Are Libraries Required?
    Now I realize it is a different issue (although that other post is relevant).
    Issue: I create a package -- a template in this case.
    I deploy it in my file system and then load it into the resource palette as a file system connection.
    I create a new application. From the resource palette, I add the jar to the view controller project, and am able to use the template in jsf files. No problem. Runs fine.
    then I load the application into subversion or I move the whole application to another directory on my computer.
    When I open the moved application (or do a checkout from subversion), I open the jsf that contains a reference to the jar, the design view is completely blank. Going to the source, I see my original code, but there are red signals in the upper-right signifying an error.
    If I run the application without fixing it, I get an error saying the template cant be found, Also, when I deployed to a standalone weblogic server, I get the same error (see the post above for this error).
    I open the project properties. The ADF Library is in the "Libraries and Classpath" and pressing edit, I can see the correct reference to the path of the jar.
    To make the application work, I have to remove the ADF Library (or at least the reference when pressing edit) and then from the resource palette, add it again to the project.
    IS THIS NORMAL? Am I doing something wrong with the initial packaging of the jar? Should I change some setting somewhere?
    How am I supposed to deploy to weblogic?
    The other posting shows an error output if I try to run the application before fixing the jar reference. I got the same darn error when deploying to weblogic.
    Would appreciate any help!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 4:45 AM

    Timo,
    thank you for your reply. I actually created a youtube video on this, available here: http://youtu.be/ERyLngq9hlI
    Since the video might be a little tedious to view, Here are the details. You can jump to the exciting parts of the video, if you want:
    Here is what I did:
    1. I cleaned out my system directory and the temp directory on my computer.
    2. Opened the application containing my template. Deleted the existing jar file.
    3. Started taking video....
    4. (From 40 seconds into the video) Created the jar file again.
    5. (2:55 minuts into video) Closed template applcation and Created new fusion application.
    6. (4 minutes into the video) Created model
    7. (4:15 minutes into video) in view controller added template, created a jsf page.
    8. (5 minutes into the video) Created Security and users.
    9. (6:30 minutes into the video) Created a task flow, with jsff in it, with a form on the jsff. Assigned Security to objects.
    *10. (7 minutes into the video). Ran JSF successfully.*
    11. (7:40 minutes into the video). Closed application. Copied the entire application into two directories.
    12. (8 minutes into video) Opened the first copied video. You can see that the jsf page is not accessing the template. Reviewed the View Controller project Libraries and classpath. Removed the library, re-added the jar from the resource palette. Worked fine.
    13. (9:30 minutes into video). Opened the 2nd copy of the file I intend for subversion. Showed the jsf page and the error it displays when open (same as in first copied application).
    Load application into subversion.
    14. (10 minutes into video). Check out application
    15. (10:15 minutes into video). Open JSF file. The reference to the template jar file is reading properly.
    16. (11 minutes into video). Load the original working copy into subversion.
    17. (11:30 minutes into video). Check out from subverion, but the check out failed.
    18. (12 minutes into video). Check out, and look at the jsf.  The page shows fine.
    Timo, I think this might be reported as a bug. You ought to be able to move files around on your computer. Also, the first time I checked the application out from subversion, the jsf page did not read the template.
    ALSO, when I tried to deploy the application (that contained the reference to the template jar file to weblogic), I got the same error when I ran the jsf
    first lines of that error:
    Error 500--Internal Server Error
    java.io.FileNotFoundException: /WEB-INF/ssfTemplate/SSFTemplate.jsf Not Found in ExternalContext as a Resource
    at com.sun.faces.facelets.impl.DefaultFaceletFactory.resolveURL(DefaultFaceletFactory.java:224)
    Thank you for your time and commitment!
    Stuart
    Edited by: Stuart Fleming on Nov 18, 2012 10:13 AM

  • Tools for generating weblogic-cmp-rdbms-jar.xml files

    Hi All:
    I am using Weblogic 8.1 sp6 and MyEclipse 5.1.
    Does anybody knows if weblogic 8.1 provides a wizard or tool or some product that will help you generate the
    weblogic-cmp-rdbms-jar.xml and webloigc-ejb-jar.xml files if given the ejb-jar.xml, the home, remote and bean classes and the database server information.
    The reason, I am asking this is because if you're using Hibernate, there is a hibernate tool that will generate the hbm.xml and persistence classes given a particular database information.
    I was wondering if there is the same thing in ejb development with weblogic 8.1 sp6?
    Yours,
    Desperate

    I think u r some confusion with productID and SuppliedID . primary key of one column( productId ) can be a foreign key of other table colum( SuppliedID). but foreign key( SuppliedID) can not be a primary key of second table .u declared SuppliedId as primary key . so ur mapping is incorrect.

  • Question about weblogic-cmp-rdbms-jar.xml

    WinNT 4.0 SP6, Weblogic 5.10
    In the online documents, it says:
    ---- digest from the online documents ----
    The following example finds all the EJBs in a table. It uses the
    sample finder method signature:
    public Enumeration findAllAccounts()
    throws FinderException, RemoteException
    The sample <finder> stanza uses an empty WLQL string:
    <finder>
    <method-name>findAllAccounts</method-name>
    <finder-query></finder-query>
    </finder>
    ---- End of digest ----
    However I implement it in my sample EJB, call findAllAccounts in the
    client JSP file, get a SQLException about "null after where".
    How can i solve this problem?
    Thanks in advance,
    Paul Shen
    Email: [email protected]
    WWW: shensr.8m.com

    In the DOCTYPE declaration, replace "weblogic-cmp-rdbms-jar" with
    "weblogic-rdbms-jar".
    Bob
    "Jason" <[email protected]> wrote in message
    news:[email protected]..
    >
    When I deploy my bean I get the following error:
    While reading META-INF/weblogic-cmp-rdbms-jar.xml, the EntityEJB's pers
    istence layer failed to deploy. The error was:
    Error in descriptor line 7: Document root element "weblogic-rdbms-jar",must ma
    tch DOCTYPE root "weblogic-cmp-rdbms-jar".
    atweblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:302)
    >
    >
    Here is my deployment descriptor: (weblogic-cmp-rdbms-jar.xml)
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-cmp-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'
    >
    >
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>MessageEJB</ejb-name>
    <data-source-name>ora8lplxPoolDataSource</data-source-name>
    <table-name>Messages</table-name>
    <field-map>
    <cmp-field>msg_id</cmp-field>
    <dbms-column>msg_id</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>msg</cmp-field>
    <dbms-column>msg</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>msg_date</cmp-field>
    <dbms-column>msg_date</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    </weblogic-rdbms-jar>

  • Why weblogic-cmp-rdbms-jar.xml.old gets created in Weblogic 7?

    Hi all,
    I use the build.bat file for creating the jar file
    build.bat
    ==========
    mkdir build build\META-INF
    copy *.xml build\META-INF
    @REM Compile EJB classes into the build directory (jar preparation)
    javac -d build *.java
    @REM Make a EJB jar file, including XML deployment descriptors
    cd build
    jar cv0f std_ejb_accountcmp.jar META-INF ejb
    cd ..
    @REM Run EJBC on jar file
    java -classpath %WL_HOME%/lib/weblogic.jar weblogic.ejbc -convertDDs -verbose -keepgenerated -compiler javac build\std_ejb_accountcmp.jar d:\ejb_accountcmp.jar
    =============================================================
    Any ideas why when u unjar the jar file created for deployment in Weblogic 7.0, it creates an old copy of the xml files used
    For example :
    weblogic-ejb-jar.xml has weblogic-ejb-jar.xml.old
    ejb-jar.xml has ejb-jar.xml.old
    Why does it replace the weblogic-cmp-rdbms-jar.xml to weblogic-cmp-rdbms-jar.xml.old?
    Rgds,
    Seetesh

    Hi Indra,
    Thanks for ur post.
    I have now renamed the weblogic-cmp-rdbms-jar.xml to weblogic-cmp20-rdbms-jar.xml and made the changes in the weblogic-ejb-jar.xml file in the type-storage parameter.
    Now after executing the foll cmd
    java ..... weblogic.ejbc old.jar new.jar
    The new.jar file contains the generated stub/skeleton along with the additional old files for the 2 xml's ejb-jar.xml and weblogic-ejb-jar.xml.
    Using the Weblogic builder utility, while opening the new.jar file, it discards the old xml deployment descriptors and creates new ones in its place.
    Cld u give me some hints on using the Deployment tool? I use it to deploy the new.jar file.
    Rgds,
    Seetesh

  • Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml

    Hi,
    I am getting an error running appc. I am upgrading from wl 7 to wl 8.1. ejbc works
    fine on wl 7. Anyone seen this before?
    [J2EE:160121]Errors encountered while compiling module 'e:\dev\xstatic\tmp\xstatic_Intermediate.jar':
    [EJB:011017]Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error
    was:
    java.lang.NullPointerException
    at weblogic.ejb20.cmp.rdbms.finders.ExprWHERE.init_method()V(ExprWHERE.java:47)
    at weblogic.ejb20.cmp.rdbms.finders.BaseExpr.init(Lweblogic.ejb20.cmp.rdbms.finders.QueryContext;Lweblogic.ejb20.cmp.rdbms.finders.QueryNode;)V(BaseExpr.java:230)
    at weblogic.ejb20.cmp.rdbms.finders.ExprROOT.init_method()V(ExprROOT.java:89)
    at weblogic.ejb20.cmp.rdbms.finders.BaseExpr.init(Lweblogic.ejb20.cmp.rdbms.finders.QueryContext;Lweblogic.ejb20.cmp.rdbms.finders.QueryNode;)V(BaseExpr.java:230)
    at weblogic.ejb20.cmp.rdbms.finders.QueryContext.generateQuery()V(QueryContext.java:91)
    at weblogic.ejb20.cmp.rdbms.finders.Finder.computeSQLQuery(Lweblogic.ejb20.cmp.rdbms.RDBMSBean;)V(Finder.java:1002)
    at weblogic.ejb20.cmp.rdbms.RDBMSBean.generateFinderSQLStatements(Ljava.util.Iterator;)V(RDBMSBean.java:2692)
    at weblogic.ejb20.cmp.rdbms.Deployer.readTypeSpecificData(Ljava.io.InputStream;Ljava.lang.String;)V(Deployer.java:479)
    at weblogic.ejb20.persistence.PersistenceType.setTypeSpecificFile(Lweblogic.ejb20.interfaces.EntityBeanInfo;Lweblogic.ejb20.persistence.spi.CMPDeployer;)V(PersistenceType.java:483)
    at weblogic.ejb20.persistence.PersistenceType.setupDeployer(Lweblogic.ejb20.interfaces.EntityBeanInfo;Ljava.io.File;Lweblogic.utils.Getopt2;Lweblogic.utils.jars.VirtualJarFile;)Lweblogic.ejb20.persistence.spi.CMPDeployer;(PersistenceType.java:414)
    at weblogic.ejb20.deployer.CMPInfoImpl.setup(Ljava.io.File;Lweblogic.utils.Getopt2;Lweblogic.utils.jars.VirtualJarFile;)V(CMPInfoImpl.java:113)
    at weblogic.ejb20.ejbc.EJB20CMPCompiler.generatePersistenceSources(Lweblogic.ejb20.interfaces.EntityBeanInfo;Lweblogic.utils.jars.VirtualJarFile;)Ljava.util.List;(EJB20CMPCompiler.java:64)
    at weblogic.ejb20.ejbc.EJBCompiler.doCompile(Ljava.util.Collection;Lweblogic.utils.jars.VirtualJarFile;)V(EJBCompiler.java:245)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.management.configuration.EJBComponentMBean;Lweblogic.management.descriptors.toplevel.EJBDescriptorMBean;Lweblogic.utils.jars.VirtualJarFile;Lweblogic.j2ee.valid
    ation.ModuleValidationInfo;Lweblogic.ejb20.ejbc.VersionHelper;Ljava.util.Collection;)V(EJBCompiler.java:468)
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.utils.jars.VirtualJarFile;Lweblogic.j2ee.validation.ModuleValidationInfo;)V(EJBCompiler.java:387)
    at weblogic.appc.compileEJB(Lweblogic.utils.classloaders.GenericClassLoader;Lweblogic.utils.jars.VirtualJarFile;Ljava.io.File;Lweblogic.j2ee.validation.ModuleValidationInfo;)V(appc.java:735)
    at weblogic.appc.compileEJB()V(appc.java:709)
    at weblogic.appc.compileInput()V(appc.java:446)
    at weblogic.appc.runBody()V(appc.java:167)
    at weblogic.utils.compiler.Tool.run([Ljava.lang.String;)V(Tool.java:146)
    at weblogic.utils.compiler.Tool.run()V(Tool.java:103)
    at weblogic.appc.main([Ljava.lang.String;)V(appc.java:961)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    It is a bug for the EJB container to respond with an NPE.
    (It's been fixed in v9 Beta, and it might be fixed in an 8.1 service pack but I can't recall off the top of my head). At any rate, I'm pretty sure that an EJB QL query with an empty WHERE clause will cause this. I would look for a query that ends in ' WHERE'.
    -thorick

  • Weblogic-cmp-rdbms-jar.xml for One-To-Many unidirectional relationship

    hi,
    I am trying to create a simple cmp One-To-Many unidirectional relationship and deploy the same in weblogic. Can someone help me with the weblogic-cmp-rdbms-jar.xml. Am attaching the weblogic-cmp-rdbms-jar. xml tht i am using as also the corresponding ejb-jar.xml. Pls. note tht i want a unidirectional relationship here. one i am tryng However i get this error:
    Error while reading 'META-INF/weblogic-cmp-rdbms-jar.xml'. The error was: Role 'Supplier supplies Products' of relationship 'Product Supplier' contains an invalid key-column value of 'productID'. The key-column must specify a primary key column in the related bean. However, there is no primary key column named 'productID' defined in the related bean 'ProductEJB' or else 'productID' is not being recognized due to case mismatch. My weblogic-cmp-rdbms-jar
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-rdbms-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB RDBMS Persistence//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-rdbms-jar.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
         <ejb-name>SupplierEJB</ejb-name>
         <data-source-name>RJDataSource</data-source-name>
         <table-map>
               <table-name>AA_Supplier</table-name>
               <field-map>
                     <cmp-field>supplierID</cmp-field>
                     <dbms-column>supplierID</dbms-column>
               </field-map>
               <field-map>
                    <cmp-field>name</cmp-field>
                    <dbms-column>name</dbms-column>
               </field-map>
         </table-map>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-bean>
           <ejb-name>ProductEJB</ejb-name>
           <data-source-name>RJDataSource</data-source-name>
           <table-map>
                 <table-name>AA_Product</table-name>
                 <field-map>
                      <cmp-field>productID</cmp-field>
                      <dbms-column>productid</dbms-column>
                 </field-map>
                 <field-map>
                      <cmp-field>description</cmp-field>
                      <dbms-column>description</dbms-column>
                 </field-map>
                 <field-map>
                      <cmp-field>basePrice</cmp-field>
                      <dbms-column>baseprice</dbms-column>
                 </field-map>
                <field-map>
                      <cmp-field>name</cmp-field>
                      <dbms-column>name</dbms-column>
                 </field-map>
                 <field-map>
                     <cmp-field>supplierID</cmp-field>
                       <dbms-column>supplierID</dbms-column>
                 </field-map>
            </table-map>
    </weblogic-rdbms-bean>
    <weblogic-rdbms-relation>
         <relation-name>Product Supplier</relation-name>
         <weblogic-relationship-role>
              <relationship-role-name>Supplier supplies Products</relationship-role-name>
              <relationship-role-map>
                   <column-map>
                        <foreign-key-column>supplierID</foreign-key-column>
                        <key-column>productID</key-column>
                   </column-map>
              </relationship-role-map>
         </weblogic-relationship-role>
         <weblogic-relationship-role>
              <relationship-role-name>Product supplied by Supplier</relationship-role-name>
              <relationship-role-map>
              <column-map>
                   <foreign-key-column>products</foreign-key-column>
                   <key-column>supplierID</key-column>
              </column-map>
              </relationship-role-map>
         </weblogic-relationship-role>
    </weblogic-rdbms-relation>
    </weblogic-rdbms-jar> My ejb-jar.xml
    <?xml version="1.0"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <ejb-jar>
         <enterprise-beans>
         <entity>
              <ejb-name>SupplierEJB</ejb-name>
              <home>com.tpt.practice.entityBeans.cmp.product.relationship.SupplierHome</home>
              <remote>com.tpt.practice.entityBeans.cmp.product.relationship.Supplier</remote>
              <ejb-class>com.tpt.practice.entityBeans.cmp.product.relationship.SupplierEJB</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>java.lang.String</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-version>2.x</cmp-version>
              <abstract-schema-name>AA_Supplier</abstract-schema-name>
              <cmp-field>
                   <field-name>supplierID</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>name</field-name>
              </cmp-field>
              <primkey-field>supplierID</primkey-field>
              <ejb-ref>
                        <ejb-ref-name>ProducEJB</ejb-ref-name>
                        <ejb-ref-type>Entity</ejb-ref-type>
                        <home>com.tpt.practice.entityBeans.cmp.product.ProductHome</home>
                        <remote>com.tpt.practice.entityBeans.cmp.product.Product</remote>
                        <ejb-link>ProductEJB#ProductEJB.jar</ejb-link>
              </ejb-ref>
              <query>
                   <query-method>
                        <method-name>findByName</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Supplier AS a WHERE a.name =
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findAllSuppliers</method-name>
                        <method-params>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Supplier AS a WHERE a.supplierID
                        IS NOT NULL]]>
                   </ejb-ql>
              </query>
         </entity>
         <entity>
              <ejb-name>ProductEJB</ejb-name>
              <home>com.tpt.practice.entityBeans.cmp.product.relationship.ProductHome</home>
              <remote>com.tpt.practice.entityBeans.cmp.product.relationship.Product</remote>
              <local-home>com.tpt.practice.entityBeans.cmp.product.relationship.ProductLocalHome</local-home>
              <local>com.tpt.practice.entityBeans.cmp.product.relationship.ProductLocal</local>
              <ejb-class>com.tpt.practice.entityBeans.cmp.product.relationship.ProductEJB</ejb-class>
              <persistence-type>Container</persistence-type>
              <prim-key-class>com.tpt.practice.entityBeans.cmp.product.relationship.ProductPK</prim-key-class>
              <reentrant>False</reentrant>
              <cmp-version>2.x</cmp-version>
              <abstract-schema-name>AA_Product</abstract-schema-name>
              <cmp-field>
                   <field-name>productID</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>name</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>description</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>basePrice</field-name>
              </cmp-field>
              <cmp-field>
                   <field-name>supplierID</field-name>
              </cmp-field>
              <primkey-field>productID</primkey-field>
              <query>
                   <query-method>
                        <method-name>findByName</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.name =
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findByDescription</method-name>
                        <method-params>
                             <method-param>java.lang.String</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.description
                        = ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findByBasePrice</method-name>
                        <method-params>
                             <method-param>double</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.basePrice =
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findExpensiveProducts</method-name>
                        <method-params>
                             <method-param>double</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.basePrice >
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findCheapProducts</method-name>
                        <method-params>
                             <method-param>double</method-param>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.basePrice <
                        ?1]]>
                   </ejb-ql>
              </query>
              <query>
                   <query-method>
                        <method-name>findAllProducts</method-name>
                        <method-params>
                        </method-params>
                   </query-method>
                   <ejb-ql>
                        <![CDATA[SELECT OBJECT(a) FROM AA_Product AS a WHERE a.productID
                        IS NOT NULL]]>
                   </ejb-ql>
              </query>
         </entity>
         </enterprise-beans>
         <relationships>
         <ejb-relation>
              <ejb-relation-name>Product Supplier</ejb-relation-name>
              <ejb-relationship-role>
                   <ejb-relationship-role-name>Supplier supplies Products</ejb-relationship-role-name>
                   <multiplicity>One</multiplicity>
                   <relationship-role-source>
                        <ejb-name>SupplierEJB</ejb-name>
                   </relationship-role-source>
                   <cmr-field>
                        <cmr-field-name>products</cmr-field-name>
                        <cmr-field-type>java.util.Collection</cmr-field-type>
                   </cmr-field>
              </ejb-relationship-role>
              <ejb-relationship-role>
                   <ejb-relationship-role-name>Product supplied by Supplier</ejb-relationship-role-name>
                   <multiplicity>Many</multiplicity>
                   <relationship-role-source>
                        <ejb-name>ProductEJB</ejb-name>
                   </relationship-role-source>
              </ejb-relationship-role>
         </ejb-relation>
         </relationships>
         <assembly-descriptor>
              <container-transaction>
              <method>
                   <ejb-name>SupplierEJB</ejb-name>
                   <method-intf>Remote</method-intf>
                   <method-name>*</method-name>
              </method>
              <trans-attribute>Required</trans-attribute>
              </container-transaction>
         </assembly-descriptor>
    </ejb-jar>

    I think u r some confusion with productID and SuppliedID . primary key of one column( productId ) can be a foreign key of other table colum( SuppliedID). but foreign key( SuppliedID) can not be a primary key of second table .u declared SuppliedId as primary key . so ur mapping is incorrect.

  • Weblogic-cmp-rdbms-jar.xml

    When I deploy my bean I get the following error:
    While reading META-INF/weblogic-cmp-rdbms-jar.xml, the Entity EJB's pers
    istence layer failed to deploy. The error was:
    Error in descriptor line 7: Document root element "weblogic-rdbms-jar", must ma
    tch DOCTYPE root "weblogic-cmp-rdbms-jar".
    at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:302)
    Here is my deployment descriptor: (weblogic-cmp-rdbms-jar.xml)
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-cmp-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'>
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>MessageEJB</ejb-name>
    <data-source-name>ora8lplxPoolDataSource</data-source-name>
    <table-name>Messages</table-name>
    <field-map>
    <cmp-field>msg_id</cmp-field>
    <dbms-column>msg_id</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>msg</cmp-field>
    <dbms-column>msg</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>msg_date</cmp-field>
    <dbms-column>msg_date</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    </weblogic-rdbms-jar>

    In the DOCTYPE declaration, replace "weblogic-cmp-rdbms-jar" with
    "weblogic-rdbms-jar".
    Bob
    "Jason" <[email protected]> wrote in message
    news:[email protected]..
    >
    When I deploy my bean I get the following error:
    While reading META-INF/weblogic-cmp-rdbms-jar.xml, the EntityEJB's pers
    istence layer failed to deploy. The error was:
    Error in descriptor line 7: Document root element "weblogic-rdbms-jar",must ma
    tch DOCTYPE root "weblogic-cmp-rdbms-jar".
    atweblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:302)
    >
    >
    Here is my deployment descriptor: (weblogic-cmp-rdbms-jar.xml)
    <?xml version="1.0"?>
    <!DOCTYPE weblogic-cmp-rdbms-jar PUBLIC
    '-//BEA Systems, Inc.//DTD WebLogic 6.0.0 EJB RDBMS Persistence//EN'
    'http://www.bea.com/servers/wls600/dtd/weblogic-rdbms20-persistence-600.dtd'
    >
    >
    <weblogic-rdbms-jar>
    <weblogic-rdbms-bean>
    <ejb-name>MessageEJB</ejb-name>
    <data-source-name>ora8lplxPoolDataSource</data-source-name>
    <table-name>Messages</table-name>
    <field-map>
    <cmp-field>msg_id</cmp-field>
    <dbms-column>msg_id</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>msg</cmp-field>
    <dbms-column>msg</dbms-column>
    </field-map>
    <field-map>
    <cmp-field>msg_date</cmp-field>
    <dbms-column>msg_date</dbms-column>
    </field-map>
    </weblogic-rdbms-bean>
    </weblogic-rdbms-jar>

  • Transaction Isolation Levels in weblogic-cmp-rdbms-jar.xml

    Hi All,
    Iam using ejb 1.1 specification with weblogic 5.1. We can set the transaction
    isolation levels for the methods in the
    weblogic-ejb-jar.xml. There is also a provision for setting this isolation level
    in the weblogic-cmp-rdbms-jar.xml. Now is there any difference between setting
    the isolation levels in these two ways.
    Help me asap.

    The CMP setting has been deprecated. You can set it for all types of
    EJBs in the weblogic-ejb-jar.xml
    -- Rob
    chandru wrote:
    Hi All,
    Iam using ejb 1.1 specification with weblogic 5.1. We can set the transaction
    isolation levels for the methods in the
    weblogic-ejb-jar.xml. There is also a provision for setting this isolation level
    in the weblogic-cmp-rdbms-jar.xml. Now is there any difference between setting
    the isolation levels in these two ways.
    Help me asap.

  • Column-map in weblogic-cmp-rdbms-jar.xml

    Hi,
    How to specify column-map for the following database tables:
    Table1: id,col2,col3. Primary key - id.
    Table2: m_id,description,col4,col5. Primay key - (m_id,col4).
    The relationship I specified is table1-has-many-table2. This is a 1 to m relation
    and
    Table1.id = Table2.m_id.
    I specified the following column-map
    <column-map>
    <foreign-key-column>m_id</foreign-key-column>
    <key-column>id</key-column>
    </column-map>
    But the server is throwing an exception that all the columns in table2 should
    me mapped.
    But in this case, I can join the tables with just id only. What should I specify
    for col4 map?.
    I can just reverse the mapping, but I am trying to test the boundaries of weblogic
    server.
    Is this case handled in weblogic server implementation?.
    I am testing relationship-role-map for ejb2.0 on weblogic server8.1 beta version.
    Thanks,
    Sathish

    Hello Sathish,
    Glad to help! Have a wonderful week.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Sathish Kandacharam" <[email protected]> wrote:
    >
    Hi Ryan,
    Thanks alot. That example helped alot.
    Thanks,
    Sathish
    "Ryan LeCompte" <[email protected]> wrote:
    Hello Sathish,
    Please refer to the sample code that comes packaged with BEA WebLogic
    Server for
    examples of how the weblogic-cmp-rdbms-jar.xml file should look forall
    of the
    various relationships. In particular, look at the Bands example.
    Best regards,
    Ryan LeCompte
    [email protected]
    http://www.louisiana.edu/~rml7669
    "Sathish Kandacharam" <[email protected]> wrote:
    Hi,
    How to specify column-map for the following database tables:
    Table1: id,col2,col3. Primary key - id.
    Table2: m_id,description,col4,col5. Primay key - (m_id,col4).
    The relationship I specified is table1-has-many-table2. This is
    a
    1 to m relation
    and
    Table1.id = Table2.m_id.
    I specified the following column-map
    <column-map>
    <foreign-key-column>m_id</foreign-key-column>
    <key-column>id</key-column>
    </column-map>
    But the server is throwing an exception that all the columns intable2
    should
    me mapped.
    But in this case, I can join the tables with just id only. Whatshould
    I specify
    for col4 map?.
    I can just reverse the mapping, but I am trying to test the boundaries
    of weblogic
    server.
    Is this case handled in weblogic server implementation?.
    I am testing relationship-role-map for ejb2.0 on weblogic server8.1
    beta version.
    Thanks,
    Sathish

  • Entity Finder mothod takes run time String. How can I specify in CDATA of the weblogic-cmp-ejb-jar.xml

    Hi everyone,
    I have an CMP bean which has findByName(String). During deployment of the ejb
    I tell the bean use the WLQL such as
    (like string%), but I would like to pass the name when the user enter in the text
    box of the .html page then the user click on search, the servlet is called and
    process using ejb technique. If I specified (like Fre%) in the ejb despcriptor
    for one particular case( such as looking for all Fred's), it will not work for
    the user enters smith.
    for example: user enter: Fre in the text box.
    I would like to have the bean do the query for me like:
    --> select * from user where lastName like Fre%
    If I cannot tell in the CDATA field, does that mean I have to use BMP to write
    query that takes the name.
    Please help,
    Thanks in advance.

    Thanks Jim,
    I did exactly like in the example (like Name $0) Name is my cmp field, but this
    time it always returns one entity (same entity )regardless what I entered to search
    by name. So that means it did not take the parameter that defined in <find-param>
    of the weblogic-cmp-rdbm-jar.xml. Do you have any suggestion or idea to overcome
    this problem.
    Thanks Jim,
    Tom
    Jim Weaver <[email protected]> wrote:
    >
    Tom
    You can use like with a String parameter in WLQL. There is an example
    in our
    documentation at
    http://www.weblogic.com/docs51/classdocs/API_ejb/EJB_environment.html#1022700
    Thanks
    Jim
    Tom wrote:
    Hi everyone,
    I have an CMP bean which has findByName(String). During deploymentof the ejb
    I tell the bean use the WLQL such as
    (like string%), but I would like to pass the name when the user enterin the text
    box of the .html page then the user click on search, the servlet iscalled and
    process using ejb technique. If I specified (like Fre%) in the ejbdespcriptor
    for one particular case( such as looking for all Fred's), it will notwork for
    the user enters smith.
    for example: user enter: Fre in the text box.
    I would like to have the bean do the query for me like:
    --> select * from user where lastName like Fre%
    If I cannot tell in the CDATA field, does that mean I have to use BMPto write
    query that takes the name.
    Please help,
    Thanks in advance.Content-Description: Card for Jim Weaver
    begin:vcard
    n:Weaver;Jim
    x-mozilla-html:FALSE
    org:BEA Systems Inc.
    adr:;;.;;;;
    version:2.1
    email;internet:[email protected]
    title:Developer Relations Engineer
    fn:Jim Weaver
    end:vcard

Maybe you are looking for