Local EJBs in Weblogic 12c

Hi - We are in the process of migrating our applications from Weblogic 10.3 to 12c. Due to legacy nature of the application, it's still using EJB 2.x
Can somebody please let us know if Weblogic 12c fully supports EJB 2.x APIs and specifications. We are having some local EJBs in the code too. Would there be any potential issues migrating any local/remote EJBs or is it supposed to work out of the box?
Note: We have already gone through the article http://docs.oracle.com/cd/E24329_01/web.1211/e24446/compatibility.htm#INTRO112 and have modified our EJBs to use EJBGen annotations. We have also run our EJBs through 12c appc and it does not report any such errors.
Thanks!

I guess the local JNDI name will be visible only when you look up from the
same .ear scoped applications. It will not be visible in the global JNDI
tree (applications outside of the .ear cannot access the bean as it is
local).
I am not sure what you refer by testing via console. If you want to access
the bean from a different application (another .jar or .war which is not
part of a .ear), then you should use remote views instead of local views.
--Sathish
<Santiago Abadia> wrote in message news:[email protected]..
Hi.
There isn't any error message in the server log. It says that deployment
is sucessful.
The message that appears when I try to test the EJB in the console is:
"There was a problem determining the JNDI Name of the given bean."
Thanks

Similar Messages

  • Problem in calling Local EJB in weblogic 7.0

    Hi,
    I'm calling a Local Ejb from a client application, but i'm getting the following exception
    Exceptionjavax.naming.NameNotFoundException: Unable to resolve 'local' Resolved:
    '' Unresolved:'local' ; remaining name 'local'
    I'm Using Weblogic 7.0
    But I have given the correct JNDI name in the deployment descriptor and whereever necessary
    If any one knows abt this, pls reply back, its urgent
    Thanks in advance
    Kiran

    Hi again,
    The exact exception is below,
    Exceptionjavax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: Invalid  name:app/ejb/kmml.jar#MMLDatavalidationEJB/local-home]; Link Remaining Name: 'java:app/ejb/kmml.jar#MMLDatavalidationEJB/local-home'
    thanks
    kiran

  • Programmatic JAAS Authentication for Web/EJBs on WebLogic 12c

    Technologies: JSPs, Servlets, EJBs (version 2.1)
    Database: Oracle 11g Database
    Application Server: WebLogic 12c
    I am working on a project where the users and roles are stored on an Oracle database (as database users with roles granted to them). We therefore need a custom authentication method (the default WebLogic UsernamePasswordLoginModule won't cut it). We created a DatabaseUserLoginModule prior to migrating from a 10g enviroment to 11g/12c.
    public class DatabaseUserLoginModule implements LoginModule
         public boolean login() throws LoginException
              Connection conn = null;
              try
                   s
                   InitialContext ic = new InitialContext();
                   DataSource ds = (DataSource)ic.lookup(jndiDSName);
                   conn = ds.getConnection(username, password);
                   List dbauth = new ArrayList();
                   String rolesSQL = "SELECT GRANTED_ROLE FROM USER_ROLE_PRIVS UNION SELECT GRANTED_ROLE FROM ROLE_ROLE_PRIVS";
                   Statement rolesStmt = conn.createStatement();
                   ResultSet results = rolesStmt.executeQuery(rolesSQL);
                   dbauth.add(new DBUserPrincipal(username));
                   while (results.next())
                        String roleName = results.getString("GRANTED_ROLE");
                        DBRolePrincipal dbRolePrincipal = new DBRolePrincipal(roleName);
                        dbauth.add(dbRolePrincipal);
                   authPrincipals = (Principal[])dbauth.toArray(new Principal[dbauth.size()]);
              catch (Exception e)
                   throw new LoginExcpetion(e.getMessage());
              finally
                   try
                        conn.close();
                   catch (Exception e)
                        throw new LoginExcpetion(e.getMessage());
              return true;
         public boolean commit() throws LoginException
              for (int i = 0; i < authPrincipals.length; i++)
                   subject.getPrincipals().add(authPrincipals[i]);
              return true;
    The getConnection() method on the datasource works with a database username and password thanks to the new "Use Database Credentials" option for WebLogic datasources and granting CONNECT THROUGH (datasource user) privilege for each user.
    We have configured a JAAS context to use this login module by creating a jaas.conf file and setting JAVA_OPTIONS to include "-Djava.security.auth.login.config=%DOMAIN_HOME%\bin\jaas.conf". The file looks like this:
    Test {
    xxxx.controller.security.loginmodule.DatabaseUserLoginModule required;
    When the user logs in, the application uses a LoginContext object to perform authentication:
        PassiveCallbackHandler cbh = new PassiveCallbackHandler(username, password);
        lc = new LoginContext("Test", cbh);
        lc.login();
    This successfully uses the DatabaseUserLoginModule to authenticate the user and populate the Subject with the appropriate roles.
    The next step is to use an InitialContext to lookup an EJB and call a method. We have permissions in ejb-jar.xml for each method, based on database roles:
    <method-permission>
         <role-name>XXXX_USER</role-name>
         <method>
              <ejb-name>AccessControl</ejb-name>
              <method-intf>Home</method-intf>
             <method-name>create</method-name>
             <method-params>
                   <method-param>java.lang.String</method-param>
             </method-params>
         </method>
         <method>
             <ejb-name>AccessControl</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>remove</method-name>
         </method>
         <method>
             <ejb-name>AccessControl</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>processFailedLogin</method-name>
             <method-params>
                   <method-param>java.lang.String</method-param>
             </method-params>
         </method>
         <method>
             <ejb-name>AccessControl</ejb-name>
             <method-intf>Remote</method-intf>
             <method-name>processSuccessfulLogin</method-name>
             <method-params>
                   <method-param>java.lang.String</method-param>
             </method-params>
         </method>
    </method-permission>
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
    env.put(Context.PROVIDER_URL, "t3://localhost:7101");
    env.put(Context.SECURITY_PRINCIPAL, username);
    env.put(Context.SECURITY_CREDENTIALS, password);
    InitialContext ic = new InitialContext(env);
    ic.lookup("EJBName");
    The problem is that when the InitialContext is initialised I get the following error:
    javax.naming.AuthenticationException [Root exception is javax.security.auth.login.FailedLoginException: [Security:090304]Authentication Failed: User XXXX_USER] javax.security.auth.login.FailedLoginException: [Security:090302]Authentication Failed: User XXXX_USER denied]
    It looks like the InitialContext is attempting to authenticate the user through WebLogic's default authenticator. How do I tell it to use the JAAS context (with the custom login module) I have already set up?
    If I use the default constructor (new InitialContext()) then I get a different error when calling an EJB method:
    <java.rmi.AccessException: [EJB:010160]Security violation: User <anonymous> has insufficient permission to access EJB type=<ejb>, application=TestApplication, module=TestEJB.jar, ejb=AccessControl, method=processSuccessfulLogin, methodInterface=Remote, signature={java.lang.String}.>
    In this case, how do I propagate the Subject after using LoginContext so that the user calling EJB methods is not anonymous?

    This is the JDev & ADF forum. Your question is better asked in one of the WebLogic forums!
    Timo

  • Challenge: call local ejb from remote ejb on weblogic 9.2

    Hi ALL,
    How do I call to local ejb from remote ejb object. The jar file is deployed on weblogic server 9.2, if you want get it http://geocities.yahoo.com.br/lindembe/BEAProject.jar and the source code are http://geocities.yahoo.com.br/lindembe/BEAProject.zip. It is a sample app with two ejb that works so good on JBOSS, JOnAS, but BEA Weblogic.....
    The complete problem you watch http://forum.java.sun.com/thread.jspa?threadID=768718&messageID=4387570#4387570
    or
    http://forums.bea.com/bea/message.jspa?messageID=600043148&tstart=0

    Your code in SigemFacadeBean should just do:
    InitialContext ctx = new InitialContext();
    when you lookup the local EJB. (This will work on all app servers. There's no need to put an app-server specific intial context factory in your code.)
    Also, you can remove the jndi-name setting for the local ejb from your weblogic-ejb-jar.xml. jndi-name is only applied to remote ejbs.
    -- Rob
    WLS Blog http://dev2dev.bea.com/blog/rwoollen/

  • CDI not working in Weblogic 12c Embedded EJB Container?

    Hi,
    we are trying to use embedded ejb container from weblogic 12c (12.1.2.0) for our junit tests.
    As our application is running in weblogic 12c, we would like to run our tests  in same environment.
    But we encountered two problems, which brings me to the conclusion that CDI is not working correctly in embedded ejb container.
    1. CDI Interceptor are not working
    2. CDI Objects (@Inject) are null
    I can provide an error message, which I think is thrown, when container tries to access the interceptor, because if I delete the interceptors the error message gets no longer thrown:
    Caused by: java.lang.UnsupportedOperationException: authenticatedLookup is unavailable for BasicNamingNode types
          at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:234)
          at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:463)
          at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:274)
          at weblogic.jndi.internal.ServerNamingNode_12120_WLStub.authenticatedLookup(UnknownSource)
          at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:483)
    We just want to know, if CDI is not working in embedded ejb container, so we can go ahead and look for another solution for our junit tests.
    Stefan

    Hi There,
    If you have access to Oracle Support Portal, please go through below Knowledge Articles which can provide more information on your requirement:
    Sample Application Using Timer API (CommonJ) to configure Timer Based tasks in Oracle WebLogic Cluster 10.3.X Cluster (Doc ID 1614886.1)
    Clustered EJB Timer - The minimum time for recurring execution of a timer (Doc ID 1931091.1)
    Let us know if it helps.
    Cheers,
    Naveen

  • Weblogic 12c cluster and EJB 3.1 timers

    Hello!
    I'm using Weblogic 12c (12.1.1.0) Cluster.
    I configured the cluster to use database for EJB timers (ACTIVE and WEBLOGIC_TIMERS tables). I created a persistence store with logical name 'timerst'.
    The timer bean:
    @Stateless
    public class TimerTestBean {
         private Logger logger = Logger.getLogger(TimerTestBean.class);
         @Resource
         TimerService timerService;
         public void settimer() {
              logger.info("settimer");
              timerService.createTimer(30000, "New timer");
         @Timeout
         public void zszszszs(Timer arg0) {
              logger.info("Tick");
              settimer();
    weblogic-ejb-jar.xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-ejb-jar xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-ejb-jar" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd http://xmlns.oracle.com/weblogic/weblogic-ejb-jar http://xmlns.oracle.com/weblogic/weblogic-ejb-jar/1.3/weblogic-ejb-jar.xsd">
    <!--weblogic-version:12.1.1-->
    <wls:weblogic-enterprise-bean>
    <wls:ejb-name>TimerTestBean</wls:ejb-name>
    <wls:stateless-session-descriptor>
    <wls:timer-descriptor>
    <wls:persistent-store-logical-name>timerst</wls:persistent-store-logical-name>
    </wls:timer-descriptor>
    </wls:stateless-session-descriptor>
    </wls:weblogic-enterprise-bean>
    <wls:timer-implementation>Clustered</wls:timer-implementation>
    </wls:weblogic-ejb-jar>
    It seems the timer starts normally.
    When there timer fires, I've got the following error message:
    java.lang.ClassCastException: timertest.TimerTestBean_9kqf6o_Impl cannot be cast to javax.ejb.TimedObject
    What is wrong?
    Thanks
    Balazs
    Edited by: 892403 on 2013.02.19. 10:43
    Edited by: 892403 on 2013.02.19. 10:44

    Issues have been found with @Schedule and @Timeout annotations in WLS clustered timer implementation.
    The problem is fixed with 12.1.2 WLS version. Patch exists for 12.1.1.0 version.
    Please download and apply Patch 13417115 from Oracle Support Portal.
    Thanks,
    Vijaya

  • Trying to look up a LOCAL EJB (Weblogic 8.1)

    Hi,
    I'm trying to look up a LOCAL EJB (Weblogic 8.1):
    try
    Context ct = new InitialContext();
    Object o = ct.lookup("*ejbSecurityDataLocalHelper*");
    catch(...)
    I systematically get the following exception:
    Caused by: javax.naming.LinkException: Root exception is javax.naming.NameNotFoundException: While trying to look up /app/ejb/AEX_JRK_security_EJB.jar#SecurityDataHelper/local-home in /app/ejb/ISL_MSD_mktdata_general_EJB.jar#MarketDataGeneralManager.; remaining name '/app/ejb/AEX_JRK_security_EJB/jar#SecurityDataHelper/local-home'; Link Remaining Name: 'java:app/ejb/AEX_JRK_security_EJB.jar#SecurityDataHelper/local-home'
    Where SecurityDataHelper is the Local EJB, who's called from MarketDataGeneralManager EJB.
    I realized that the Weblogic JNDI tree shows a red dot next to the name SecurityDataHelperLocalHome: as the other names are not red, I could guess there was something wrong at deployment... buy deployment logs are OK. When I tryied to test the EJB via the Weblogic console there was a message "The EJB SecurityDataHelper has not been tested successfully. There was a problem determining the JNDI Name of the given bean. "
    My ejb-jar.xml looks like this:
    <session>
    <ejb-name>SecurityDataHelper</ejb-name>
    <local-home>com.MyLocalHome</local-home>
    <local>com.MyLocalObject</local>
    <ejb-class>com.MyBean</ejb-class>
    <session-type>Stateless</session-type>
    <transaction-type>Container</transaction-type>
    </session>
    and my weblogic-ejb-jar.xml:
    <weblogic-enterprise-bean>
    <ejb-name>SecurityDataHelper</ejb-name>
    <stateless-session-descriptor>
    </stateless-session-descriptor>
    <enable-call-by-reference>True</enable-call-by-reference>
    <local-jndi-name>ejbSecurityDataLocalHelper</local-jndi-name>
    </weblogic-enterprise-bean>
    What I am doing wrong???

    Hi Dan,
    As u have targeted the ConnectionFactory to "soa_server1" which is running on "realHostName:7001" ....Can u please check from the AdminConsole that the JNDI name ""jms/b2b/B2BQueueConnectionFactory" is present in the JNDI Tree?
    AdminConsole---->Servers---soa_server1 (click) ---> in this general configuration page you will see a link "View JNDI Tree" please ckick on that link to see the JNDI tree entries.
    If you dont see any JNDI entry there then it means there is something wrong while setting up the Connection Factory in that case please refer to the Screenshots of Creating and Targeting the Connection Factory: *http://middlewaremagic.com/weblogic/?p=1987*
    Thanks
    Jay SenSharma
    *http://middlewaremagic.com/weblogic (Middleware magic Is Here)*

  • Error while deploying an application on weblogic 12c. An error occurred while reading the deployment descriptor. The error was: Error processing annotations

    Anyone please help me solve this error. I am trying to deploy an application on weblogic 12c  i am getting an error but the same application gets successfully deployed on weblogic 11g. The error is
    An error occurred during activation of changes, please see the log for details.
    Exception preparing module: EJBModule(gsCallbackAdapterLGTX-ejb.jar) An error occurred while reading the deployment descriptor. The error was: Error processing annotations: .
    [EJB:015001]Unable to link class com.aep.gridsmart.adapters.lgtx.buslogic.deliver.xform.AdapterTransfomerDeliverSession in Jar /appl/oracle/middleware/WLS/12.1.1.0/user_projects/domains/Gridsmart/servers/ManagedServer1/tmp/_WL_user/gsCallbackAdapterLGTX/34vz4d/gsCallbackAdapterLGTX-ejb.jar : java.lang.NoClassDefFoundError: com/aep/gridsmart/adapter/deliver/CommonAdapterDeliverBean

    Cotton please let me know what is the mistake i am
    doingThe following path does not exist.
    C:\Sun\AppServer7\domains\domain1\server1\
    applications\j2ee-modules\task_1\WEB-INF\web.xml

  • Deployement problem in weblogic 12c and as well as weblogic 10.3.0.0

    Hello All,
    I am newbie to Ejb and weblogic so i need your assist, please help me guys.
    while deploying my jar file into weblogic i got these errors on admin console i.e
    *"An error occurred during activation of changes, please see the log for details.*
    *Exception preparing module: EJBModule(demo) [EJB:011023]An error occurred while reading the deployment descriptor.*
    *The error was: Error processing annotations: .*
    *There are 1 nested errors: weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load class com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\phanidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException: Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
    *The deployment has been successfully installed. "*
    and in server console displaying like this
    "*<30 Apr, 2012 11:39:02 AM IST> <Warning> <Deployer> <BEA-149004> <Failures were*
    *detected while initiating deploy task for application 'demo'.>*
    *<30 Apr, 2012 11:39:02 AM IST> <Warning> <Deployer> <BEA-149078> <Stack trace fo*
    *r message 149004*
    *weblogic.application.ModuleException: Exception preparing module: EJBModule(demo*
    *[EJB:011023]An error occurred while reading the deployment descriptor. The error*
    *was:*
    *Error processing annotations: .*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *Truncated. see log file for complete stacktrace*
    *weblogic.utils.ErrorCollectionException:*
    *There are 1 nested errors:*
    *weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load clas*
    *s com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\pha*
    *nidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException:*
    *Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1264)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
    *File(EjbDescriptorFactory.java:93)*
    *at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
    *.java:1198)*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:42)*
    *at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
    *va:615)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
    *ava:191)*
    *at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
    *duleDeployment.java:16)*
    *at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
    *ntStateChecker.java:155)*
    *at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
    *ContainerInvoker.java:60)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
    *eateAndPrepareContainer(ActivateOperation.java:197)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
    *Prepare(ActivateOperation.java:89)*
    *at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
    *epare(AbstractOperation.java:217)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
    *entPrepare(DeploymentManager.java:723)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
    *mentList(DeploymentManager.java:1190)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
    *(DeploymentManager.java:248)*
    *at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
    *pare(DeploymentServiceDispatcher.java:159)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
    *at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
    *gWorkManagerImpl.java:516)*
    *at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
    *at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1263)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *Truncated. see log file for complete stacktrace*
    *>*
    *<30 Apr, 2012 11:39:02 AM IST> <Error> <Console> <BEA-240003> <Console encounter*
    *ed the following error weblogic.application.ModuleException: Exception preparing*
    *module: EJBModule(demo)*
    *[EJB:011023]An error occurred while reading the deployment descriptor. The error*
    *was:*
    *Error processing annotations: .*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:42)*
    *at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
    *va:615)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
    *ava:191)*
    *at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
    *duleDeployment.java:16)*
    *at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
    *ntStateChecker.java:155)*
    *at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
    *ContainerInvoker.java:60)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
    *eateAndPrepareContainer(ActivateOperation.java:197)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
    *Prepare(ActivateOperation.java:89)*
    *at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
    *epare(AbstractOperation.java:217)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
    *entPrepare(DeploymentManager.java:723)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
    *mentList(DeploymentManager.java:1190)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
    *(DeploymentManager.java:248)*
    *at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
    *pare(DeploymentServiceDispatcher.java:159)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
    *at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
    *gWorkManagerImpl.java:516)*
    *at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
    *at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
    *Caused by: weblogic.utils.ErrorCollectionException:*
    *There are 1 nested errors:*
    *weblogic.j2ee.dd.xml.AnnotationProcessException: [EJB:015002]Unable to load clas*
    *s com.ejb.model.MyIntfImpl in Jar F:\Oracle\Middleware\user_projects\domains\pha*
    *nidevnew\servers\AdminServer\upload\demo.jar : java.lang.ClassNotFoundException:*
    *Class bytes found but defineClass()failed for: 'com.ejb.model.MyIntfImpl'*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1264)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
    *File(EjbDescriptorFactory.java:93)*
    *at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
    *.java:1198)*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
    *at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(Modu*
    *leListenerInvoker.java:93)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(Depl*
    *oymentCallbackFlow.java:387)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:58)*
    *at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(Dep*
    *loymentCallbackFlow.java:42)*
    *at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.ja*
    *va:615)*
    *at weblogic.application.utils.StateMachineDriver.nextState(StateMachineD*
    *river.java:37)*
    *at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.j*
    *ava:191)*
    *at weblogic.application.internal.SingleModuleDeployment.prepare(SingleMo*
    *duleDeployment.java:16)*
    *at weblogic.application.internal.DeploymentStateChecker.prepare(Deployme*
    *ntStateChecker.java:155)*
    *at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(App*
    *ContainerInvoker.java:60)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.cr*
    *eateAndPrepareContainer(ActivateOperation.java:197)*
    *at weblogic.deploy.internal.targetserver.operations.ActivateOperation.do*
    *Prepare(ActivateOperation.java:89)*
    *at weblogic.deploy.internal.targetserver.operations.AbstractOperation.pr*
    *epare(AbstractOperation.java:217)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploym*
    *entPrepare(DeploymentManager.java:723)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploy*
    *mentList(DeploymentManager.java:1190)*
    *at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare*
    *(DeploymentManager.java:248)*
    *at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.pre*
    *pare(DeploymentServiceDispatcher.java:159)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)*
    *at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallb*
    *ackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)*
    *at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTunin*
    *gWorkManagerImpl.java:516)*
    *at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)*
    *at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addProcessingError(B*
    *aseJ2eeAnnotationProcessor.java:1263)*
    *at weblogic.j2ee.dd.xml.BaseJ2eeAnnotationProcessor.addFatalProcessingEr*
    *ror(BaseJ2eeAnnotationProcessor.java:1269)*
    *at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processAnnotatio*
    *ns(EjbAnnotationProcessor.java:172)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processStandard*
    *Annotations(EjbDescriptorReaderImpl.java:324)*
    *at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyD*
    *escriptorFromJarFile(EjbDescriptorReaderImpl.java:190)*
    *at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJar*
    *File(EjbDescriptorFactory.java:93)*
    *at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule*
    *.java:1198)*
    *at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)*
    *>*
    *My application is*
    *MyIntf:*
    package com.ejb.model;
    import javax.ejb.;
    @Remote
    public interface MyIntf
    public String getMsg();
    *MyIntfImpl:*
    +package com.ejb.model;+
    +import javax.ejb.*;+
    +import javax.annotation.*;+
    +@Stateless(mappedName="demoapp")+
    +public class MyIntfImpl implements MyIntf+
         public String getMsg()
              System.out.println("in getMsg() method" );
              return "Hello I am from getMsg() method" ;
         @PostConstruct
         public void init()
              System.out.println("in init() method" );
         @PreDestroy+
         public void destroy()
         System.out.println("in destroy() method" );
    *persistence.xml in META-INF folder is*
    +<persistence xmlns="http://java.sun.com/xml/ns/persistence"+
    +xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"+
    +xsi:schemaLocation="http://java.sun.com/xml/ns/persistence+
    http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
              <persistence-unit name="myunit" transaction-type="JTA">
              <jta-data-source>myds</jta-data-source>
              </persistence-unit>
              </persistence>
    The above code is compiled fine,
    I create it as demo.jar by using jar -cvf demo.jar com META-INF,
    After that i deployed then i got above errors,
    I deployed same app into glassfish then it works fine with out prob.
    I configured DATA SOURCE properly,
    But why i got these error and solve it..
    Please guys

    Note that WebLogic 12c endorses JavaEE6.
    Look ups and how JNDI works is explained in the JavaEE6 tutorial: http://docs.oracle.com/javaee/6/tutorial/doc/gipjf.html

  • How to get Initial context of Local Interface in weblogic 8.1

    I have developed a local entity bean but i wouldnt able to initial context of that bean
    CAN ANYBODY HELP ME
    bean deployment descriptor
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
    <!--
    ** This file was automatically generated by EJBGen 2.16
    ** Build: 20031001-1049
    -->
    <ejb-jar>
    <enterprise-beans>
    <entity>
    <ejb-name>CabinBean</ejb-name>
    <home>my.CabinRemoteHome</home>
    <remote>my.CabinRemote</remote>
    <ejb-class>my.CabinBean</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinBean</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    <entity>
    <ejb-name>CabinLocal</ejb-name>
    <local-home>my.CabinLocalHome</local-home>
    <local>my.CabinLocalLocal</local>
    <ejb-class>my.CabinLocal</ejb-class>
    <persistence-type>Container</persistence-type>
    <prim-key-class>java.lang.Integer</prim-key-class>
    <reentrant>True</reentrant>
    <cmp-version>2.x</cmp-version>
    <abstract-schema-name>CabinLocal</abstract-schema-name>
    <cmp-field>
    <field-name>bedCount</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>deckLevel</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>id</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>name</field-name>
    </cmp-field>
    <cmp-field>
    <field-name>shipId</field-name>
    </cmp-field>
    <primkey-field>id</primkey-field>
    <ejb-local-ref>
    <ejb-ref-name>LocalCabin</ejb-ref-name>
    <ejb-ref-type>Entity</ejb-ref-type>
    <local-home>CabinLocalHome</local-home>
    <local>CabinLocal</local>
    <ejb-link>LocalCabin</ejb-link>
    </ejb-local-ref>
    <security-identity>
    <use-caller-identity/>
    </security-identity>
    </entity>
    </enterprise-beans>
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name>CabinLocal</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    <container-transaction>
    <method>
    <ejb-name>CabinBean</ejb-name>
    <method-name>*</method-name>
    </method>
    <trans-attribute>Required</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    <ejb-client-jar>EjbClient</ejb-client-jar>
    </ejb-jar>
    ************************************** Client Code****************
    package com;
    import my.CabinBean;
    import my.CabinRemoteHome;
    import my.CabinRemote;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import javax.naming.NamingException;
    import java.rmi.RemoteException;
    import java.util.Properties;
    import javax.rmi.PortableRemoteObject;
    import weblogic.jndi.Environment;
    public class Test
        public static void main(String args[])
            try{
                 Context context = getInitialContext();
                          Object cab = context.lookup("CabinLocalHome");
                ///**********-- Exception is thrown at this point -******************
                System.out.println("============ done====");
                Context ct = getInitialContext();
                Object ref = ct.lookup("CabinHomeRemote");
                CabinRemoteHome home = (CabinRemoteHome)PortableRemoteObject.narrow(ref,CabinRemoteHome.class);
                //CabinRemote cab = home.create(new Integer(1));
                //cab.setName("Master Suite");
                //cab.setDeckLevel(new Integer(1));
                //cab.setShipId(new Integer(1));
                //cab.setBedCount(new Integer(1));
                Integer pk = new Integer(1);
                CabinRemote cab1 = home.findByPrimaryKey(pk);
                System.out.println("--->>>>>>>> "+cab1.getName());
                System.out.println("--->>>>>>>>  "+cab1.getShipId());
                System.out.println("--->>>>>>>>"+cab1.getBedCount());
                System.out.println("--->>>>>>>>"+cab1.getDeckLevel());
                System.out.println("---");  
          }catch(java.rmi.RemoteException e){e.printStackTrace();}
           catch(javax.naming.NamingException e){e.printStackTrace();}
           //catch(javax.ejb.CreateException e){e.printStackTrace();}
           catch(javax.ejb.FinderException e){e.printStackTrace();}
        public static Context getInitialContext() throws javax.naming.NamingException
           Properties p = new Properties();
           p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
           p.put(Context.PROVIDER_URL,"t3://localhost:7001");
           return new javax.naming.InitialContext(p);
    } ************************************** Error ***********************
    javax.naming.LinkException: [Root exception is javax.naming.LinkException:  [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null']; Link Remaining Name: 'java:app/ejb/myejb.jar#CabinLocal/local-home'
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:284)
         at weblogic.rmi.cluster.ReplicaAwareRemoteRef.invoke(ReplicaAwareRemoteRef.java:244)
         at weblogic.jndi.internal.ServerNamingNode_813_WLStub.lookup(Unknown Source)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:369)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:357)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at com.Test.main(Test.java:27)
    Caused by: javax.naming.LinkException: [Root exception is javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home]; Link Remaining Name: 'null'
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:98)
         at weblogic.jndi.internal.ServerNamingNode.resolveObject(ServerNamingNode.java:292)
         at weblogic.jndi.internal.BasicNamingNode.resolveObject(BasicNamingNode.java:771)
         at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
         at weblogic.jndi.internal.RootNamingNode_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:477)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:420)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:144)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:415)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:30)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: javax.naming.NameNotFoundException: remaining name: /app/ejb/myejb.jar#CabinLocal/local-home
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:35)
         at weblogic.j2eeclient.SimpleContext.resolve(SimpleContext.java:39)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:57)
         at weblogic.j2eeclient.SimpleContext.lookup(SimpleContext.java:62)
         at weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWrapper.java:45)
         at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
         at javax.naming.InitialContext.lookup(InitialContext.java:347)
         at weblogic.jndi.internal.WLNamingManager.getObjectInstance(WLNamingManager.java:96)

    Hi,
    from what I gather, u have two jars
    1. EJBClient - this will have remote and home interfaces and will be used by the client
    2. myEJB - this iwll have all the classes - remote & home interfaces, the bean class and all the other classes required by the bean.
    Now, the question is, who is acting as the client of your EJB ? There are 3 possibilities
    1. A servlet
    2. Another EJB
    3. a simple java program.
    In the first 2 cases, you can go for Local Interfaces (more so in the second case than the first). The reason being that the the client and server will be in the same JVM. Thus, in the first case, if the Web container and the ejb container are in the same app server, EJBs can be local.
    However, in the third case, it is unlikey that you will have the client runnng and the same jvm as the server, because the server is using the jvm provided by weblogic.
    Thus, you cannot use local interfaces in this 3rd case. I have a feeling that this is what you are doing. If so, change the local interfaces to remote.
    See if this helps. Else, I will mail you some sample code. But I am afraid, sample code wont be of much help bcoz this seems to be a design problem.
    regards

  • A problem determining the JNDI Name of a local EJB with WL 8.1

    Hi,
    I created a very simple local EJB and deployed it with Weblogic8.1. When I test
    it in the Weblogic server admin page, I got the following message:
    "The EJB MyLocal has not been tested successfully. There was a problem determining
    the JNDI Name of the given bean."
    Can anyone help figure out the problem?
    Thanks
    Henry

    Does the ejb have a target server specified?
    Does the Ejb have a Jndi binding as specified in the <local-jndi-name></local-jndi-name>
    element of weblogic-ejb-jar.xml?
    thanks,
    Deepak
    "Henry" <[email protected]> wrote:
    >
    >
    Hi,
    I created a very simple local EJB and deployed it with Weblogic8.1. When
    I test
    it in the Weblogic server admin page, I got the following message:
    "The EJB MyLocal has not been tested successfully. There was a problem
    determining
    the JNDI Name of the given bean."
    Can anyone help figure out the problem?
    Thanks
    Henry

  • Local Interfaces in WebLogic 7.0 Not Faster Than Remote Interfaces?

    I was curious how much faster calling business methods in
    a stateless session EJB in WebLogic 7.0 would be through
    a local interface than calling the same business methods
    through a remote interface. I timed both ways of calling
    the same methods and much to my surprise the times were
    nearly identical. I double-checked that in one case I really
    used the local interface (using ejb-local-ref, local-jndi-name,
    local interfaces in source code). Does anybody (perhaps from
    BEA) have an explanation for this? By the way, I ran the
    same experiment with other J2EE application servers such
    as IBM's WebSphere 5 (Beta) and there was a tremendous
    performance difference between local and remote interface
    usage.
    Thanks,
    Reinhard

    "Reinhard Klemm" <[email protected]> wrote in message
    news:[email protected]...
    I appreciate your response and, at the same time, I am somewhat
    surprised about it. Here are the reasons for my surprise:
    1. Your response indicates that WebLogic uses RMI for
    EJB local method calls, i.e., even if the client is on the same VM.
    I would have assumed that WebLogic would bypass RMI in such
    a situation.That is not what I said. Local interfaces wont use rmi.
    But remote interfaces do better if the call is from the same VM. This is
    weblogic rmi optimization. Please see Rob's posting also.
    2. Other J2EE application servers fare a lot better. In one
    experiment, I timed WebLogic against WebSphere 5.0 Technology
    for Developers (i.e., WebSphere 5.0 Beta, which is expressly
    NOT for performance testing) and against the Sun Reference
    Implementation. Here are the numbers for calling business
    methods in a stateless session EJB through its local interface:
    WebLogic: 5.15 ms on the average
    WebSphere: 0.41 ms on the average
    Sun Reference Implementation: 0.11 ms on the average
    This indicates to me that both WebSphere and the Sun Reference
    Implementation are better optimized than WebLogic by excluding
    RMI when making local EJB calls.
    Reinhard
    "Maruthi Nuthikattu" <[email protected]> wrote in message
    news:<[email protected]>...
    Can you post some numbers so that we can visualize the difference.
    Please add the numbers with other J2EE appserver also.
    Otherwise top of my head, the reason is:
    Weblogic rmi is well optimized for the calls with in the same JVM andsame
    J2EE application.
    This could be the reason you are not seeing much difference.
    ..maruthi
    "Reinhard Klemm" <[email protected]> wrote in message
    news:[email protected]...
    I was curious how much faster calling business methods in
    a stateless session EJB in WebLogic 7.0 would be through
    a local interface than calling the same business methods
    through a remote interface. I timed both ways of calling
    the same methods and much to my surprise the times were
    nearly identical. I double-checked that in one case I really
    used the local interface (using ejb-local-ref, local-jndi-name,
    local interfaces in source code). Does anybody (perhaps from
    BEA) have an explanation for this? By the way, I ran the
    same experiment with other J2EE application servers such
    as IBM's WebSphere 5 (Beta) and there was a tremendous
    performance difference between local and remote interface
    usage.
    Thanks,
    Reinhard

  • Error deploying EJB in weblogic 7.0

    Hello
    I am trying to deploy EJB 2.0, to Weblogic 7.0 server on IBM machine and i am
    getting this following error. Previously I have tested deploying the same EJB
    to weblogic 7.0 server on my local PC which based on Windows, and everything seems
    Ok.
    Unable to deploy EJB: DACEJB.jar from DACEJB.jar:
    Compiler failed executable.exec(java.lang.String[javac, -nowarn, -classpath, /bea/weblogic700/server/bin/tmp_ejbsmeap01ibm7001myserver/-1spvbzuqlvq3z:/bea/weblogic700/server/bin/DACEJB.jar:/usr/java131/jre/lib/rt.jar:/usr/java131/jre/lib/i18n.jar:/usr/java131/jre/classes:/CMS/CORP/config/:/bea/weblogic700:/bea/weblogic700/server/lib/crack.jar:/bea/weblogic700/server/lib/classes12_g.jar:/bea/weblogic700/server/lib/HostMsgDriverV2.1_oracle.jar:/bea/weblogic700/server/lib/aal2wrap.jar:/bea/weblogic
    700/server/lib/log4j.jar:/bea/weblogic700/server/lib/Opta2000.jar:/bea/weblogic700/server/lib/xmlx.jar:/bea/weblogic700/server/lib/VelisAuth.jar:/bea/weblogic700/server/lib/jython.jar:/usr/java131/lib/tools.jar:/bea/weblogic700/server:/bea/weblogic700/server/lib/weblogic_sp.jar:/bea/weblogic700/server/lib/weblogic.jar:,
    -d, tmp_ejbsmeap01ibm7001myserver/-
            at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java(Compiled
    Code))
            at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)
            at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:490)
            at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:793)
            at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1242)
            at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:242)
            at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled
    Code))
            at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java(Compiled
    Code))
            at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java(Compiled
    Code))
            at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)
            at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))
            at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    This may happen because javac is not available to weblogic.
    Make sure that PATH environment variable used to start the server includes path to Java SDK bin dir with javac in it.
    Regards,
    Slava Imeshev
    "Jennifer" <[email protected]> wrote in message news:[email protected]...
    >
    Hello
    I am trying to deploy EJB 2.0, to Weblogic 7.0 server on IBM machine and i am
    getting this following error. Previously I have tested deploying the same EJB
    to weblogic 7.0 server on my local PC which based on Windows, and everything seems
    Ok.
    Unable to deploy EJB: DACEJB.jar from DACEJB.jar:
    Compiler failed executable.exec(java.lang.String[javac, -nowarn, -classpath,
    /bea/weblogic700/server/bin/tmp_ejbsmeap01ibm7001myserver/-1spvbzuqlvq3z:/bea/weblogic700/server/bin/DACEJB.jar:/usr/java131/jre/lib/rt.jar:/usr/java131/jre/lib/i18n.jar:/usr/java131/jre/classes:/CMS/CORP/config/:/bea/weblogic700:/bea/weblogic700/server/lib/crack.jar:/bea/weblogic700/server/lib/classes12_g.jar:/bea/weblogic700/server/lib/HostMsgDriverV2.1_oracle.jar:/bea/weblogic700/server/lib/aal2wrap.jar:/bea/weblogic>700/server/lib/log4j.jar:/bea/weblogic700/server/lib/Opta2000.jar:/bea/weblogic700/server/lib/xmlx.jar:/bea/weblogic700/server/lib/VelisAuth.jar:/bea/weblogic700/server/lib/jython.jar:/usr/java131/lib/tools.jar:/bea/weblogic700/server:/bea/weblogic700/server/lib/weblogic_sp.jar:/bea/weblogic700/server/lib/weblogic.jar:,> -d, tmp_ejbsmeap01ibm7001myserver/->>>         at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java(Compiled> Code))>         at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:396)>         at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:490)>         at weblogic.ejb20.deployer.EJBDeployer.compileEJB(EJBDeployer.java:793)>         at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1242)>         at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:242)>         at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java(Compiled> Code))>         at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java(Compiled> Code))>         at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java(Compiled> Code))>         at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:24)>         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java(Compiled Code))>         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:134)>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Weblogic 12c not picking up persistence unit in WAR

    I'm trying to get an example CRUD application to run on WebLogic 12c (for the app see: http://henk53.wordpress.com/2012/04/15/jsf2-primefaces3-ejb3-jpa2-integration-project/)
    So far the applications runs on JBoss AS 7.1, GlassFish 3.1.2 and TomEE beta 2. In all those application servers persistence.xml is picked-up, and processed so I'm at a loss what's wrong with WebLogic. I'm using Eclipse 3.7.2 and the Oracle WebLogic 12C WTP server adapter for the deployment.
    I'm getting the following exception:
    java.lang.IllegalArgumentException: No persistence unit named 'entityManager' is available in scope jsf_ejb_jpa. Available persistence units: []
         at weblogic.persistence.ModulePersistenceUnitRegistry.getPersistenceUnit(ModulePersistenceUnitRegistry.java:130)
         at weblogic.persistence.BasePersistenceContextProxyImpl.<init>(BasePersistenceContextProxyImpl.java:40)
         at weblogic.persistence.TransactionalEntityManagerProxyImpl.<init>(TransactionalEntityManagerProxyImpl.java:31)
         at weblogic.persistence.EntityManagerInvocationHandlerFactory.createTransactionalEntityManagerInvocationHandler(EntityManagerInvocationHandlerFactory.java:20)
         at weblogic.persistence.PersistenceManagerObjectFactory.createPersistenceContextProxy(PersistenceManagerObjectFactory.java:66)
         at weblogic.persistence.PersistenceManagerObjectFactory.getObjectInstance(PersistenceManagerObjectFactory.java:31)
         at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
         at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.java:251)
         at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:406)
         at weblogic.j2eeclient.java.ClientReadOnlyContextWrapper.lookup(ClientReadOnlyContextWrapper.java:35)
         at weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:130)
         at javax.naming.InitialContext.lookup(InitialContext.java:392)
         at javax.naming.InitialContext.doLookup(InitialContext.java:265)
         at com.oracle.pitchfork.inject.Jsr250Metadata.jndiLookup(Jsr250Metadata.java:307)
         at com.oracle.pitchfork.inject.Jsr250Metadata.resolveByName(Jsr250Metadata.java:303)
         at com.oracle.pitchfork.inject.Jsr250Metadata.resolve(Jsr250Metadata.java:266)
         at com.oracle.pitchfork.inject.Jsr250Metadata.applyInjections(Jsr250Metadata.java:228)
         at com.oracle.pitchfork.inject.Jsr250Metadata.inject(Jsr250Metadata.java:219)
         at com.oracle.pitchfork.spi.BaseComponentBrokerImpl.getBean(BaseComponentBrokerImpl.java:63)
         at com.oracle.pitchfork.spi.EjbComponentCreatorBrokerImpl.getBean(EjbComponentCreatorBrokerImpl.java:33)
         at weblogic.ejb.container.injection.EjbComponentCreatorImpl.getBean(EjbComponentCreatorImpl.java:76)
         at weblogic.ejb.container.manager.BaseEJBManager.createNewBeanInstance(BaseEJBManager.java:209)
         at weblogic.ejb.container.manager.BaseEJBManager.allocateBean(BaseEJBManager.java:235)
         at weblogic.ejb.container.manager.StatelessManager.createBean(StatelessManager.java:293)
         at weblogic.ejb.container.pool.StatelessSessionPool.createBean(StatelessSessionPool.java:185)
         at weblogic.ejb.container.pool.StatelessSessionPool.getBean(StatelessSessionPool.java:114)
         at weblogic.ejb.container.manager.StatelessManager.preInvoke(StatelessManager.java:174)
         at weblogic.ejb.container.internal.BaseLocalObject.getBeanInstance(BaseLocalObject.java:146)
         at weblogic.ejb.container.internal.BaseLocalObject.preInvoke(BaseLocalObject.java:103)
         at weblogic.ejb.container.internal.BaseLocalObject.__WL_preInvoke(BaseLocalObject.java:67)
         at weblogic.ejb.container.internal.SessionLocalMethodInvoker.invoke(SessionLocalMethodInvoker.java:20)
         at com.example.dao.jpa.JpaUserDAO_wrkew_UserDAOImpl.add(Unknown Source)
         at com.example.backing.IndexBacking.addUser(IndexBacking.java:38)
    Notice that "entityManager" is the name of the instance variable in which injection is being performed:
    @PersistenceContext(name="example")
    private EntityManager entityManager;
    If I rename this variable to "em: as follows:
    @PersistenceContext(name="example")
    private EntityManager em;
    Then, lo and behold, the exception changes into:
    java.lang.IllegalArgumentException: No persistence unit named 'em' is available in scope jsf_ejb_jpa. Available persistence units: []
    As the example uses a data-source defined in web.xml, which is only marginally supported in most application servers, I tried to define a WebLogic specific application scoped data-source instead and let the persistence unit use that. I couldn't find a way to do this in a .war (is this even possible?), so I created an .ear archive instead. When deploying the EAR, the data-source is clearly being created, but I'm getting the same exception again.
    I finally created an EJB module with a persistence.xml and a simple Singleton that's injected with the entityManager, and added that to the EAR. This works for the EJB module, but in the web module injection of the other entity manager still fails.
    Any idea what might be the problem?

    After some more fiddling, I discovered it's not WebLogic itself that's at fault here, but most likely Oracle's WTP adapter. Apparently it doesn't include persistence.xml in the archive that gets deployed. When I export the project as an .ear archive and copy this to WebLogic's autodeploy directly, things do work.
    I tried to find out what the main difference was between the deployments, but I could not find where the Oracle WTP adapter creates the deployment. I tried to test where a resource inside the EAR resides on the filesystem via the following code inside a backing bean:
    URL url = Thread.currentThread().getContextClassLoader().getResource("com/example/backing");
    It looks like there isn't a real .war or .ear being created and deployed, but there's a link back to the workspace, as the URL resolves to:
    file:/Users/henk/eclipse37ee/workspace/jsf_ejb_jpa/build/classes/com/example/backing/
    If I execute the same code for the ear in the autodeploy folder, the URL resolves to some jar inside:
    /Users/henk/eclipse37ee/wls1211_dev/mydomain/servers/myserver/tmp/_WL_user/_appsdir_jsf_ejb_jpa_ear_ear/2jzks6/war/WEB-INF/lib/
    In case of the WTP 'deployment' linking back to the Eclipse workspace, META-INF/persistence.xml is actually there too, but for some reason Weblogic can't find it there?
    Edited by: Henk on Apr 29, 2012 2:57 PM

  • Override Spring jar in Weblogic 12c

    Hi Folks,
    We have been facing an issue while overriding the Spring jar in Weblogic 12c. Basically we need to write a bean based on some 3rd party API calling their interfaces. Now they use Spring 2.5 jar for their own implementation. Since Weblogic inherently supports Spring 3.0 jar. As a result when we write our bean wrapping their interfaces and deploy it, it doesn't work. We replicated the issue by replacing Spring 2.5 jar with Spring 3 in local environment.
    If we modify the server classpath to load the Spring 2.5 jar (preceding Spring 3.0), entire soa-infra application goes down, so what We wanted to know if it is possible to override the Spring jar only for our application itself? While loading the application it will override the Spring 3.0 jar with Spring 2.5 in the application context but server will keep using Spring 3.0?
    Any ideas/suggestions highly appreciated!
    Thanks,
    Bhaskar

    Hi Bhaskar,
    have you tried packing the Spring libraries in your application and using the Filterring Classloader? Maybe this links can help you :
    Understanding WebLogic Server Application Classloading
    http://docs.oracle.com/cd/E24329_01/web.1211/e21049/weblogic_xml.htm#WBAPP601
    http://stackoverflow.com/questions/11476874/weblogic-10-3-5-overriding-spring-version
    best regards, Nicolas

Maybe you are looking for

  • Z77 g45 turning on then off then on again

    OK so I was on my computer I turned it off when I went to turn it on it just goes on for like 2 seconds then off again I tested by using one ram and it still does it also I switched the psu out and it still does it is it a faulty board

  • EX20 error when trying to install Premiere Pro update

    Hi, I tried to update PPr through the creative cloud interface and got a message saying that there may be a problem with disc space or permission (EX20). I have checked permissions on the C drive (I am on Windows 7 64bit) and it seems correct, and th

  • Adobe Presenter 7 not compatible with Office 2010?

    Despit Adobe's claims of a new version capable of functioning with office 2010, I still see it will not detect Powerpoint in both x86 as well as x64 bits versions, yes, BOTH!!!!

  • Checksum wrong in Mathematica 8

    Hi everybody! I'd like to use Mathematica 8 on my x86_64 desktop but the installation goes wrong from the first step: ./Mathematica_8.0.1_LINUX.sh Mathematica Secured 8.0.1 for LINUX Installer Archive Verifying archive integrity. Error in MD5 checksu

  • Get GUID of parent Case

    Hello, friends! I want to get GUID of parent Case in Case Management. How can I do that?