ClassNotFound Exception accessing EJBs in a cluster

I am experiencing some weird behavior when attempting to access EJBs in a
          Weblogic 5.1.0 cluster. The cluster nodes startup fine, and the EJBs are
          correctly deployed. However, when my test client attempts to access them I
          get the ClassNotFoundException listed below. This same client can access the
          same EJBs deployed in a non-clustered environment without any problems, so
          it's definitely related to my cluster configuration. The problem seems to be
          that the client is not receiving the client-side stub. To confim this, I put
          the stub in the client's classpath, and did NOT get the
          ClassNotFoundException. Has anyone else seen this error?
          BTW, I have compiled the EJB both with and without the <home-is-clusterable>
          flag set to true. I get the same exception either way.
          Thanks for any assistance,
          Jason Donnell
          javax.naming.CommunicationException. Root exception is
          java.lang.ClassNotFoundException: class
          com.landacorp.maxmc.ejb.security.ProviderSecurityBeanHomeImpl_ServiceStub
          previously not found
          at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:184)
          at weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
          at weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
          at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:700)
          at
          weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.jav
          a:34)
          at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
          at weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
          at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:355)
          at weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
          at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
          at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
          --------------- nested within: ------------------
          weblogic.rmi.UnmarshalException: Unmarshalling return
          - with nested exception:
          [java.lang.ClassNotFoundException: class
          com.landacorp.maxmc.ejb.security.ProviderSecurityBeanHomeImpl_ServiceStub
          previously not found]
          at
          weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.jav
          a:256)
          at weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
          at javax.naming.InitialContext.lookup(InitialContext.java:350)
          at
          com.landacorp.maxmc.ejb.security.ClusterSecurityTest.main(ClusterSecurityTes
          t.java:52)
          

Just a side note: I setup the cluster using the WebLogic recommended
          directory structure (see
          http://www.weblogic.com/docs51/cluster/setup.html#676105) and I no longer
          get the exception. I'm still interested in hearing, though, if anyone has a
          scheme for setting up the cluster in a directory that isn't directly under
          the weblogic installation directory.
          Jason
          "Jason Donnell" <[email protected]> wrote in message
          news:[email protected]...
          > My current idea is that our directory structure is not properly supported
          by
          > WebLogic. We are NOT putting everything under the weblogic install
          > directory, as the documentation suggests. Instead, it looks something like
          > this (on an NT box):
          >
          > \weblogic_install\<Weblogic 5.1.0 installation here>
          >
          > \our_weblogic\startWeblogicNode1.cmd
          > \our_weblogic\startWeblogicNode2.cmd
          > \our_weblogic\weblogic.properties (cluster-wide)
          > \our_weblogic\public_html\
          > \our_weblogic\our_cluster_name\
          > \our_weblogic\our_cluster_name\all_ejbs\<compiled beans are here>
          > \our_weblogic\our_cluster_name\server_node1\
          > \our_weblogic\our_cluster_name\server_node1\weblogic.properties
          > (server-specific)
          > \our_weblogic\our_cluster_name\server_node2\
          > \our_weblogic\our_cluster_name\server_node2\weblogic.properties
          > (server-specific)
          >
          > So, on the command line in our per-server startup scripts, we set the
          > weblogic.system.home=\our_weblogic,
          weblogic.cluster.name=our_cluster_name,
          > and weblogic.system.name=server_nodeX.
          >
          > Now, I want to emphasize that the server claims to start up just fine. It
          > claims the EJBs have been deployed. However, it is unable to deliver
          classes
          > dynamically, as we found by trying the
          > http://yourweblogic..../classes/some/class/name.class suggestion noted
          > previously.
          >
          > We had a similar directory structure for a single server, and it worked
          just
          > fine. However, in that case we obviously did not have the extra level of
          the
          > \our_cluster_name\ directory. It would seem that in the cluster
          > configuration, we cannot do it this way. I would be VERY interested to
          hear
          > if anyone else has setup a cluster in a directory that is not under the
          > weblogic installation directory.
          >
          > Hopefully this may shed some light on your problem. Feel free to contact
          me
          > if you need any additional information (or if you solve the problem!).
          >
          > Jason Donnell
          > [email protected]
          >
          >
          > "Chad" <[email protected]> wrote in message
          > news:[email protected]...
          > > I am very interested in this thread - I am having the same behavior:
          > >
          > > javax.naming.CommunicationException. Root exception is
          > > java.lang.ClassNotFoundException: class
          > > healthecare.drug.ejb.DrugAlternateBeanHomeImpl_ServiceStub previously
          > > not found
          > > at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:181)
          > > at
          > weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
          > > at
          weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
          > > at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:630)
          > > at
          >
          weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.jav
          > a:34)
          > > at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
          > > at weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
          > > at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:355)
          > > at
          > weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
          > > at
          > weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
          > > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:135)
          > >
          > > --------------- nested within: ------------------
          > > weblogic.rmi.UnmarshalException: Unmarshalling return
          > > - with nested exception:
          > > [java.lang.ClassNotFoundException: class
          > > healthecare.drug.ejb.DrugAlternateBeanHomeImpl_ServiceStub previously
          > > not found]
          > > at
          >
          weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.jav
          > a:256)
          > > at weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
          > > at javax.naming.InitialContext.lookup(InitialContext.java:350)
          > > at healthecare.util.EJBBase.findHomeInterface(EJBBase.java:178)
          > >
          > > One additional bit of information that I can add is that when I
          > > getInitialContext() like this:
          > >
          > > public static Context getInitialContext() throws Exception
          > > {
          > > String providerURL =
          > > "t3://" + CommonUtil.getProperty("ejb.server.name") +
          > > ":" + CommonUtil.getProperty("ejb.server.port");
          > >
          > > Hashtable ht = new Hashtable();
          > > ht.put(Context.INITIAL_CONTEXT_FACTORY,
          > > "weblogic.jndi.WLInitialContextFactory");
          > > ht.put(Context.PROVIDER_URL, providerURL);
          > >
          > > return new InitialContext(ht);
          > > }
          > >
          > > When the "ejb.server.name" property is one server, like "serverName1",
          > > the code works. But when the "ejb.server.name" property is clustered,
          > > like "serverName1, serverName2", the code throws the exception above.
          > >
          > > I'll definitely re-post if I come up with anything.
          > >
          > > thanks,
          > > chad small
          > >
          > > "Jason Donnell" <[email protected]> wrote in message
          > news:<[email protected]>...
          > > > Well, that was a good test. I discovered I am unable to download
          classes
          > > > from the clustered server when pointing my browser at it. Any ideas
          what
          > > > kind of misconfiguration on my part would cause that behavior?
          > > >
          > > > Thanks,
          > > > Jason Donnell
          > > >
          > > > "Dimitri Rakitine" <[email protected]> wrote in message
          > > > news:[email protected]...
          > > > > Try to point your browser to make sure you can actually download
          > classes
          > > > from it
          > > > > (point it to http://yourweblogic..../classes/some/class/name.class)
          > > > >
          > > > > Jason Donnell <[email protected]> wrote:
          > > > > > Yes, I know. That's the behavior that I had always seen before. Do
          > you
          > > > know
          > > > > > of any directory configurations or properties file settings that
          > could
          > > > make
          > > > > > the stub not be downloaded correctly, even though the EJB is
          > deployed on
          > > > the
          > > > > > server?
          > > >
          > > > > > "Tao Xie" <[email protected]> wrote in message
          > > > > > news:[email protected]...
          > > > > >> That's weird, Replica-aware stub should be downloaded to the
          client
          > > > except
          > > > > >> the client is on another Weblogic server.
          > > > > >>
          > > > > >> "Jason Donnell" <[email protected]> wrote in message
          > > > > >> news:[email protected]...
          > > > > >> | I am experiencing some weird behavior when attempting to access
          > EJBs
          > > > in
          > > > a
          > > > > >> | Weblogic 5.1.0 cluster. The cluster nodes startup fine, and the
          > EJBs
          > > > are
          > > > > >> | correctly deployed. However, when my test client attempts to
          > access
          > > > them
          > > > I
          > > > > >> | get the ClassNotFoundException listed below. This same client
          can
          > > > access
          > > > the
          > > > > >> | same EJBs deployed in a non-clustered environment without any
          > > > problems,
          > > > so
          > > > > >> | it's definitely related to my cluster configuration. The
          problem
          > > > seems
          > > > to
          > > > be
          > > > > >> | that the client is not receiving the client-side stub. To
          confim
          > > > this, I
          > > > put
          > > > > >> | the stub in the client's classpath, and did NOT get the
          > > > > >> | ClassNotFoundException. Has anyone else seen this error?
          > > > > >> |
          > > > > >> | BTW, I have compiled the EJB both with and without the
          > > > <home-is-clusterable>
          > > > > >> | flag set to true. I get the same exception either way.
          > > > > >> |
          > > > > >> | Thanks for any assistance,
          > > > > >> | Jason Donnell
          > > > > >> |
          > > > > >> |
          > > > > >> | javax.naming.CommunicationException. Root exception is
          > > > > >> | java.lang.ClassNotFoundException: class
          > > > > >> |
          > > > > >
          > > >
          > com.landacorp.maxmc.ejb.security.ProviderSecurityBeanHomeImpl_ServiceStub
          > > > > >> | previously not found
          > > > > >> |
          > > > > >> | at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:184)
          > > > > >> |
          > > > > >> | at
          > > > > >>
          > > >
          > weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:505)
          > > > > >> |
          > > > > >> | at
          > > >
          weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:134)
          > > > > >> |
          > > > > >> | at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:700)
          > > > > >> |
          > > > > >> | at
          > > > > >> |
          > > > > >>
          > > > > >
          > > >
          >
          weblogic.rjvm.ConnectionManagerClient.handleRJVM(ConnectionManagerClient.jav
          > > > > >> | a:34)
          > > > > >> |
          > > > > >> | at
          > > > weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
          > > > > >> |
          > > > > >> | at
          > > > weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
          > > > > >> |
          > > > > >> | at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:355)
          > > > > >> |
          > > > > >> | at
          > > > > >>
          > > >
          > weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java:247)
          > > > > >> |
          > > > > >> | at
          > > > > >>
          > > >
          > weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:23)
          > > > > >> |
          > > > > >> | at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
          > > > > >> |
          > > > > >> |
          > > > > >> |
          > > > > >> | --------------- nested within: ------------------
          > > > > >> |
          > > > > >> | weblogic.rmi.UnmarshalException: Unmarshalling return
          > > > > >> | - with nested exception:
          > > > > >> | [java.lang.ClassNotFoundException: class
          > > > > >> |
          > > > > >
          > > >
          > com.landacorp.maxmc.ejb.security.ProviderSecurityBeanHomeImpl_ServiceStub
          > > > > >> | previously not found]
          > > > > >> |
          > > > > >> | at
          > > > > >> |
          > > > > >>
          > > > > >
          > > >
          >
          weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLStub.jav
          > > > > >> | a:256)
          > > > > >> |
          > > > > >> | at
          > > > weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
          > > > > >> |
          > > > > >> | at javax.naming.InitialContext.lookup(InitialContext.java:350)
          > > > > >> |
          > > > > >> | at
          > > > > >> |
          > > > > >>
          > > > > >
          > > >
          >
          com.landacorp.maxmc.ejb.security.ClusterSecurityTest.main(ClusterSecurityTes
          > > > > >> | t.java:52)
          > > > > >> |
          > > > > >> |
          > > > > >> |
          > > > > >> |
          > > > > >>
          > > > > >>
          > > > >
          > > > >
          > > > >
          > > > > --
          > > > > Dimitri
          >
          >
          >
          >
          >
          >
          

Similar Messages

  • Security exception while trying to access EJB from stand alone client

    Hi!, I am trying a sample EJB application to R&D some security related issues. I want to access EJB through a web application as well as a stand-alone client. I have set approriate <method-permission> in EJB deployment descriptor. I am using users.properties/roles.properties file for authentication mechanism. I am using JBoss 3.2.
    - On the web application side I am using BASIC authentication and the servlet is able to access the EJB OK, as long as I am using a login/password that has access to the EJB.
    - Now I am trying to access the EJB using a stand alone Java class. These are the things I have tried till now:
    =>Created a InitialContext with appropriate principal, credentials and tried getting a reference to EJB home interface. That resulted in security exception.
    =>Logged into a LoginContext by using appropriate JBossSX classes and then tried getting a EJB home interface. Again security exception.
    Now I am not sure what to do. I read at some places about client side container but not sure what that is. Does anyone has any ideas to try? Is there any other way I can make a swing application and a web application authenticate to EJB container?
    Also can anyone point me to any documentation that gives some idea about how the security credentials gets propagated from web application/standalone client to EJB container?

    It would be better if you can post your code...and DD that way we can help you better

  • Ejb-link not working when i access ejb in different ear

    Hi All
    I am here trying to access ejb's which is in different ear, I am providing ejb-link inside web.xml of war file deployed inside deffirent ear file.
    I am using wls8.1sp5. I tried different combination with elb-link name , but its not working . <ejb-ref>
    <ejb-ref-name>ejb/AuditService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.audit.ejb.AuditServiceHome</home>
    <remote>com.onstar.audit.ejb.AuditService</remote>
    <ejb-link>ccarenewal.jar#AuditService</ejb-link>
    </ejb-ref>
    <ejb-ref>
         <ejb-ref-name>ejb/AccountService</ejb-ref-name>
         <ejb-ref-type>Session</ejb-ref-type>
         <home>com.onstar.account.ejb.AccountServiceHome</home>
         <remote>com.onstar.account.ejb.AccountService</remote>
         <ejb-link>ccarenewal.jar#AccountService</ejb-link>
         </ejb-ref>
    Exception:weblogic.management.ApplicationException: activate failed for sbwo Module: sbwo Error: weblogic.management.DeploymentException: Could not setup environment - with nested exception: [weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ccarenewal.jar#AuditService' declared in the ejb-ref or ejb-local-ref 'ejb/AuditService' in the application module 'accountadj.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct.] weblogic.deployment.EnvironmentException: [J2EE:160101]Error: The ejb-link 'ccarenewal.jar#AuditService' declared in the ejb-ref or ejb-local-ref 'ejb/AuditService' in the application module 'accountadj.war' could not be resolved. The target EJB for the ejb-ref could not be found. Please ensure the link is correct. at weblogic.deployment.EnvironmentBuilder.addEJBLinkRef(EnvironmentBuilder.java:658) at weblogic.deployment.EnvironmentBuilder.addEJBReferences(EnvironmentBuilder.java:467) at weblogic.servlet.internal.CompEnv.init(CompEnv.java:123) at weblogic.servlet.internal.WebAppServletContext.activate
    I will appreciate any help.
    Rajiv

    Rob,
    Thanks for your reply.
    Below is all deployment descriptor entries i have(ejb-jar.xml, weblogic-ejb-jar.xml, web.xml, weblogic.xml)
    please correct me if i have wrong entries any where.
    ejb-jar.xml
    ejb-ref>
    <description />
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.account.ejb.AccountServiceHome</home>
    <remote>com.onstar.account.ejb.AccountService</remote>
    <ejb-link>AccountService</ejb-link>
    </ejb-ref>
    weblogic-ejb-jar.xml
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <jndi-name>cca/AccountService</jndi-name>
    </ejb-reference-description>
    web.xml
    <ejb-ref>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <home>com.onstar.account.ejb.AccountServiceHome</home>
    <remote>com.onstar.account.ejb.AccountService</remote>
    <ejb-link>ccarenewal.jar#AccountService</ejb-link>
    </ejb-ref>
    weblogic.xml
    <ejb-reference-description>
    <ejb-ref-name>ejb/AccountService</ejb-ref-name>
    <jndi-name>cca/AccountService</jndi-name>
    </ejb-reference-description>
    I appreciate your help.
    Thanks
    Rajiv

  • Access EJB from Servlet that in different archive?

    <font class="mediumtxt">package kyro.ejb.session;
    import javax.ejb.*;
    import javax.persistence.EntityManager;
    import javax.persistence.PersistenceContext;
    @Stateless(name="StandAlone")
    @Remote(StandAlone.class)
    public class StandAloneBean
    implements StandAlone, StandAloneLocal
    public StandAloneBean() {
    public String sayHello() {     
    return "sayHello";
    I want to access ejb from servlet that .war and .jar not in single .ear. I want to try that just with annotation not xml descriptor cause is easy to understand for me. I use Glassfish. But i can't lookup that ejb. How can i lookup that ejb with jndi? Can't you give me example of servlet to access that? I not use JNDI.properties, are that caused i can't access my ejb? I just thing .war and.jar in one server, are i have to used JNDI.properties. can you explain how to use JNDI.properties in servlet or separate file?
    </font>

    But i can't lookup that ejb. How are you trying and what exception is occurring?
    How can i lookup that ejb with jndi? [https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html|https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html]
    m

  • Issue in accessing EJB from plain java

    Hi,
    I am new to OAS. I am using OAS 10.1.2.
    I want to access EJB which runs inside OAS, through a plain java program which runs from outside the OAS environment (standalone java program).
    I am confused on what to use. RMIInitialContextFactory or ApplicationClientInitialContextFactory for the context in the java program.
    what should be the provide URL ?
    java.naming.provider.url","ormi://hostname:18140/
    is it "ormi" or something else? what is the port number should i use. there are many ports in this OAS. i see that in the console("Ports") link.
    also let me know what should i mention in the EJB xml descriptor.
    Is this lookup to be done by retrieving from jndi?
    pls help.
    Thanks,
    Sukumar
    with this confusion i developed an EJB with the following details
    ejb-jar.xml
    <ejb-ref>
         <ejb-ref-name>ejb/testDetails</ejb-ref-name>
         <ejb-ref-type>Entity</ejb-ref-type>
    <home>com.xxx.xxx.testDetailsHome</home>
    <remote>com.xxx.xxx.testDetails</remote>
         </ejb-ref>
    orion-ejb-jar.xml
    <entity-deployment name="ejb/testDetails" location="ejb/testDetails"
    Client Java program
    public class testDetailsClient
    public static void main(String [] args)
    testDetailsClient testDetailsClient = new testDetailsClient();
    try
    Context context =getInitialContext();
    testDetailsHome testDetailsHome = (testDetailsHome)PortableRemoteObject.narrow(context.lookup("java:comp/env/ejb/testDetails"), testDetailsHome.class);
    testDetails testDetails;
    catch(Throwable ex)
    ex.printStackTrace();
    private static Context getInitialContext() throws NamingException
    Hashtable env = new Hashtable();
    env.put("java.naming.factory.initial","com.evermind.server.rmi.RMIInitialContextFactory");
    //env.put("java.naming.factory.initial","com.evermind.server.ApplicationClientInitialContextFactory");
    env.put("java.naming.provider.url","ormi://host_name:18140/"); //23791 18140
    env.put(Context.SECURITY_PRINCIPAL, "ias_admin");
    env.put(Context.SECURITY_CREDENTIALS, "abc123");
    InitialContext context = new InitialContext(env);
    return context;
    if i execute this, it says
    javax.naming.NameNotFoundException: java:comp/env/ejb/testDetails not found
    18140 is Application Server Control RMI port.
    if i run the same code with ApplicationClientInitialContextFactory, it throws exception saying
    java.lang.InstantiationException: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.administration.ApplicationResourceFinder.getEJBHome(ApplicationResourceFinder.java:268)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:124)
         at com.evermind.server.rmi.RMICallHandler.run(RMICallHandler.java:48)
         at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
         at java.lang.Thread.run(Thread.java:534)
    javax.naming.NamingException: Error reading application-client descriptor: No location specified and no suitable instance of the type 'com.testdetails.testDetails' found for the ejb-ref ejb/testDetails
         at com.evermind.server.ApplicationClientInitialContextFactory.getInitialContext(ApplicationClientInitialContextFactory.java:161)
         at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
         at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
         at javax.naming.InitialContext.init(InitialContext.java:219)
         at javax.naming.InitialContext.<init>(InitialContext.java:195)
         at com.testdetails.testDetailsClient.getInitialContext(testDetailsClient.java:89)
         at com.testdetails.testDetailsClient.main(testDetailsClient.java:20)
    pls help

    Hi,
    you do not have to package your EJB and PAR together! You can deploy them separately and then reference the J2EE Application from your PAR or vice versa to access it.
    For instance you can access the EJB from your PAR as described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddf20bb211d72e10000000a1553f6/frameset.htm
    Or you can access a Portal application from J2EE like described here:
    http://help.sap.com/saphelp_nw2004s/helpdata/en/42/9ddd0cbb211d72e10000000a1553f6/frameset.htm
    Even if you package your PAR in to the same EAR with your EJB they will result in two different containers on the J2EE Engine and you will have to reference them as described in the link above to access the functionality of one component from the other.
    Best regards,
    Stefan Brauneis

  • Java.sql.SQLException: Cannot obtain connection after 3600 seconds. , Exception = Access not allowed

    Using Weblogic Platform 7.0 (installed from platform700_win32.exe),
    Running a BPM Doamin(WLIDomain with BPM only).
    When I try to access my entity bean(CMP), the following exception is getting thrown.
    I have seen a similar post in here, but the answer to that post, which says to
    provide ACL. does not apply quite well my scenario.
    To do this, I right clicked on the connection pool and selected define Ploicy..
    It shows two options
    RealmAdapterAuthorizer and DefaultAuthorizer; On DefaultAuthroizer i specified
    role accessing the resource would be "everyone". - restarted the server - but
    still the same error.
    Please suggest a solution if any. Do i have to get some service pack for this?
    TIA
    Ranjith.

    We have never seen a case yet where this was not a permissions problem.
    Do you have a fileRealm.properties file as part of your configuration?
    "Ranjith" <[email protected]> wrote in message
    news:3f0fdeb3$[email protected]..
    >
    java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
    = Access not allowed
    java.sql.SQLException: Cannot obtain connection after 3600 seconds. ,Exception
    = Access not allowed
    atweblogic.jdbc.jts.Connection.wrapAndThrowSQLException(Connection.java:701)
    atweblogic.jdbc.jts.Connection.getOrCreateConnection(Connection.java:623)
    atweblogic.jdbc.jts.Connection.prepareStatement(Connection.java:133)
    atweblogic.jdbc.rmi.internal.ConnectionImpl.prepareStatement(ConnectionImpl.ja
    va:139)
    atweblogic.jdbc.rmi.SerialConnection.prepareStatement(SerialConnection.java:81
    atservice.samplemgt.v1_0.ejb.entity.BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDB
    MS.ej
    bFindAll(BanksampletypeCMP_ckv0ao__WebLogic_CMP_RDBMS.java:873)
    at java.lang.reflect.Method.invoke(Native Method)
    atweblogic.ejb20.cmp.rdbms.RDBMSPersistenceManager.collectionFinder(RDBMSPersi
    stenceManager
    java:300)
    atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
    java:715)
    atweblogic.ejb20.manager.BaseEntityManager.collectionFinder(BaseEntityManager.
    java:688)
    atweblogic.ejb20.internal.EntityEJBLocalHome.finder(EntityEJBLocalHome.java:47
    6)
    at ...

  • Too many exception"ACCESS.ERROR: Authorization check"

    We found there are too many Exception "ACCESS.ERROR: Authorization check for caller assignment to J2EE security role" occur in our Portal System with a 10 seconds interval after  checking the defalutTrace file. Can anyone help us to resolve the problem?
    thanks in advance.
    Date : 10/29/2007
    Time : 15:29:58:057
    Message : ACCESS.ERROR: Authorization check for caller assignment to J2EE security role [service.jms.default.authorization : administrators] referencing J2EE security role [SAP-J2EE-Engine : administrators].
    Severity : Error
    Category : /System/Security/Audit/J2EE
    Location : com.sap.engine.services.security.roles.SecurityRoleReference
    Application : sap.com/irj
    Thread : Thread[Thread-54,5,SAPEngine_Application_Thread[impl:3]_Group]
    Datasource : 1193643286133:/usr/sap/EP0/DVEBMGS00/j2ee/cluster/server0/log/defaultTrace.trc
    Message ID : 001125C013B40061000030D50071607A00043D9CAAE34B57
    Source Name : com.sap.engine.services.security.roles.SecurityRoleReference
    Argument Objs : ACCESS.ERROR,service.jms.default.authorization,administrators,SAP-J2EE-Engine,administrators,
    Arguments : ACCESS.ERROR,service.jms.default.authorization,administrators,SAP-J2EE-Engine,administrators,
    Dsr Component :
    Dsr Transaction : 0c229a6085c811dc8856001125c013b4
    Dsr User :
    Indent : 0
    Level : 0
    Message Code :
    Message Type : 1
    Relatives : /System/Security/Audit/J2EE
    Resource Bundlename :
    Session : 3572
    Source : com.sap.engine.services.security.roles.SecurityRoleReference
    ThreadObject : Thread[Thread-54,5,SAPEngine_Application_Thread[impl:3]_Group]
    Transaction :
    User : J2EE_GUEST
    Date : 10/29/2007
    Time : 15:29:38:017
    Message : ACCESS.ERROR: Authorization check for caller assignment to J2EE security role [SAP-J2EE-Engine : administrators].
    Severity : Error
    Category : /System/Security/Audit/J2EE
    Location : com.sap.engine.services.security.roles.SecurityRoleImpl
    Application : sap.com/irj
    Thread : Thread[Thread-54,5,SAPEngine_Application_Thread[impl:3]_Group]
    Datasource : 1193643286133:/usr/sap/EP0/DVEBMGS00/j2ee/cluster/server0/log/defaultTrace.trc
    Message ID : 001125C013B40061000030C70071607A00043D9CA9B17F21
    Source Name : com.sap.engine.services.security.roles.SecurityRoleImpl
    Argument Objs : ACCESS.ERROR,SAP-J2EE-Engine,administrators,
    Arguments : ACCESS.ERROR,SAP-J2EE-Engine,administrators,
    Dsr Component :
    Dsr Transaction : 0c229a6085c811dc8856001125c013b4
    Dsr User :
    Indent : 0
    Level : 0
    Message Code :
    Message Type : 1
    Relatives : /System/Security/Audit/J2EE
    Resource Bundlename :
    Session : 3570
    Source : com.sap.engine.services.security.roles.SecurityRoleImpl
    ThreadObject : Thread[Thread-54,5,SAPEngine_Application_Thread[impl:3]_Group]
    Transaction :
    User : J2EE_GUEST

    Hi Jan,
    I have implemented these patches usage Type EP.
    CAF 13.1
    SAP-JEE 13.1
    SAP-JEECOR 13.3
    SAP_JTECHF 13.1
    SAP_JTECJS 13.1
    UMEADMIN 13.2
    Take a look at:
    Support Packages and Patches -> SAP NetWeaver -> SAP NETWEAVER -> SAP NETWEAVER 7.0 (2004S) -> Entry by Component -> Development Infrastructure
    Uwe

  • JAVA client JNDI lookup for EJB session in cluster in WLS 5.1

    The documentation says :
              to obtain a Context for JNDI lookup do the following :
              Hashtable ht = new Hashtable();
              ht.put(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
              ht.put(Context.PROVIDER_URL, "t3://mycluster:7001");
              try {
              Context ctx = new InitialContext(ht);
              // Do the client's work
              catch (NamingException ne) {
              // A failure occurred
              finally {
              try {ctx.close();}
              catch (Exception e) {
              // a failure occurred
              where "mycluster" is the DNS name of my cluster. My DNS server (Windows 200
              DNS server) use round robin
              to call alernatively all the wls server node in "mycluster" and it's OK. The
              two servers of my cluster
              are called alternatively for my EJB session stateless.
              Now I unplug one of the two nodes of my cluster and the remaining server is
              called only 2 times
              and not after.
              Questions :
              -is the load balancing between the nodes of mycluster only rely on DNS or
              is there an internal
              mecanism in EJB sub to try one server then an other ?
              - do I need to obtain a new reference on JNDI Context for each call ?
              Thank's a lot.
              Farid Bellameche.
              

              I too have the same problem. My scenario is :
              I have the web tier architecture away from cluster. All ejbs are in cluster
              running in two seperate machines. We have a factory class running in
              webtier(we use servlet in this tier) which obtains home interface only once
              and stores it for future reference. When ever we need the remoteobject stub,
              we ask the factory class and which in turn uses the stored home interface to
              get the same.
              In the webtier, I list all the servers in the cluster as a part of url as
              mentioned by you.
              I started the web tier as well as Object tier cluster. I could see the
              request coming in both the machines in the cluster for the ejb. But When I
              bring one the server in the cluster,
              1. Web tier throws an exception saying that it could not connect
              to server using t3.
              2. The other machine which is running the server, also says
              'failed to create socket to : -32323234324 sever name
              using protocol t3.
              It looks like I am able to get load balance. But I am not able to get the
              fail over to be working.
              In the weblogic-ejb-jar.xml, I added the following.
              <clustering-descriptor>
              <home-is-clusterable>true</home-is-clusterable>
              <home-load-algorithm>round-robin</home-load-algorithm>
              </clustering-descriptor>
              I compiled and added the .jar file. So the jar file now has replica aware
              stubs.
              Could any one of you help me for why the fail over is not working?
              Suersh
              "Giri Alwar" <[email protected]> wrote in message
              news:[email protected]...
              > Farid,
              > (1) Yes, the stub has the logic to perform load-balancing and
              fail-over.
              > (2) In almost all cases, no. You can get the context once, store it
              and
              > use it thereafter. Please refer to
              > http://www.weblogic.com/docs51/cluster/concepts.html#1025061 for more
              info.
              >
              > A couple of notes on your situation. From what you are describing, your
              > Windows DNS server is setup to serve only one IP from the cluster (using
              > round-robin) as opposed to a list of all IP's in the cluster. Hence, the
              > initial context you obtain is tied to a single server in the cluster (the
              > one returned by the DNS). The weblogic implementation on the client side
              has
              > no idea of the existence of the other servers in the cluster. This is not
              a
              > cluster aware context. To obtain a cluster aware context, either list all
              > the IP's in the URL like t3://server1,server2,server3:7001 or have
              > "mycluster" return a list of all servers in the cluster.
              >
              > Giri
              >
              >
              > "Farid Bellameche" <[email protected]> wrote in message
              > news:[email protected]...
              > > The documentation says :
              > >
              > > to obtain a Context for JNDI lookup do the following :
              > > Hashtable ht = new Hashtable();
              > > ht.put(Context.INITIAL_CONTEXT_FACTORY,
              > > "weblogic.jndi.WLInitialContextFactory");
              > > ht.put(Context.PROVIDER_URL, "t3://mycluster:7001");
              > > try {
              > > Context ctx = new InitialContext(ht);
              > > // Do the client's work
              > > }
              > > catch (NamingException ne) {
              > > // A failure occurred
              > > }
              > > finally {
              > > try {ctx.close();}
              > > catch (Exception e) {
              > > // a failure occurred
              > > }
              > > }
              > >
              > > where "mycluster" is the DNS name of my cluster. My DNS server (Windows
              > 200
              > > DNS server) use round robin
              > > to call alernatively all the wls server node in "mycluster" and it's OK.
              > The
              > > two servers of my cluster
              > > are called alternatively for my EJB session stateless.
              > > Now I unplug one of the two nodes of my cluster and the remaining server
              > is
              > > called only 2 times
              > > and not after.
              > >
              > > Questions :
              > > -is the load balancing between the nodes of mycluster only rely on DNS
              > or
              > > is there an internal
              > > mecanism in EJB sub to try one server then an other ?
              > >
              > > - do I need to obtain a new reference on JNDI Context for each call ?
              > >
              > >
              > > Thank's a lot.
              > >
              > > Farid Bellameche.
              > >
              > >
              > >
              > >
              >
              >
              

  • Access EJB's in JServer from MS COM clients

    We need to access our EJB's from MS COM Clients (written in C++ currently using OCI)
    Any suggestions ?
    Thanks in Advance
    null

    I got the same problem.
    Some posts here suggest you should put weblogic.jar under /common/lib,
    I tried it but it didn't work. I also tried to put it under
    webapps/yourweb/web-inf/lib
    but it didn't work too. At last I had to unpack the weblogic.jar and put
    them under
    webapps/yourweb/web-inf/classes. This at least solved the problem you
    mentioned.
    I got other problem like ClassCastException that might be due to my own
    code.
    Anyway you can try the above approach. And please post your results here
    just let
    others know.
    Thanks.
    "Gary Bartlett" <[email protected]> wrote in message
    news:3ce3fdf1$[email protected]..
    >
    Question -
    Can anyone point me at documentation that will help me understand what jarfiles
    are required to allow access EJB's that are deployed in Weblogic 6.1 froma Servlet
    that is running under Tomcat.
    I am currently getting the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class:weblogic.jndi.WLInitialContextFactory.
    >
    >
    >
    Root exception is java.lang.ClassNotFoundException:weblogic.jndi.WLInitialContextFactory
    atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
    a:1394)
    >
    >
    Thanks,
    Gary Bartlett

  • Access EJB's deployed in WL 61 from Tomcat 4.0.3

    Question -
    Can anyone point me at documentation that will help me understand what jar files
    are required to allow access EJB's that are deployed in Weblogic 6.1 from a Servlet
    that is running under Tomcat.
    I am currently getting the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class: weblogic.jndi.WLInitialContextFactory.
    Root exception is java.lang.ClassNotFoundException: weblogic.jndi.WLInitialContextFactory
    at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1394)
    Thanks,
    Gary Bartlett

    I got the same problem.
    Some posts here suggest you should put weblogic.jar under /common/lib,
    I tried it but it didn't work. I also tried to put it under
    webapps/yourweb/web-inf/lib
    but it didn't work too. At last I had to unpack the weblogic.jar and put
    them under
    webapps/yourweb/web-inf/classes. This at least solved the problem you
    mentioned.
    I got other problem like ClassCastException that might be due to my own
    code.
    Anyway you can try the above approach. And please post your results here
    just let
    others know.
    Thanks.
    "Gary Bartlett" <[email protected]> wrote in message
    news:3ce3fdf1$[email protected]..
    >
    Question -
    Can anyone point me at documentation that will help me understand what jarfiles
    are required to allow access EJB's that are deployed in Weblogic 6.1 froma Servlet
    that is running under Tomcat.
    I am currently getting the following exception:
    javax.naming.NoInitialContextException: Cannot instantiate class:weblogic.jndi.WLInitialContextFactory.
    >
    >
    >
    Root exception is java.lang.ClassNotFoundException:weblogic.jndi.WLInitialContextFactory
    atorg.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
    a:1394)
    >
    >
    Thanks,
    Gary Bartlett

  • JRE 1.4.x : ClassNotFound exception

    Hello
    I am having a problem in running a Swing based applet in 1.4.x JRE in Internet Explorer 6.0 SP1
    The HTML page loads the applet using the <APPLET> tag and the applet is loaded from a remote server.
    Via the browser settings, the browser has been instructed to use the SUN JRE Plugin for all <APPLET> tags.
    The plugin is able to retrieve the applet correctly, but, throws a ClassNotFound exception.
    The same works just fine in 1.3.1_x versions of JRE.
    Does anybody have a clue as to what is going on ?
    Thank you
    Regards

    First of all give the details about the exceptions thrown i.e. which class and what exception. Secondly install Java on the machine which is accessing APPLET through web browser. If the problem is solved it means that your internet explorer is not supporting Swing class (i.e. the required environment was not present) and this can be the problem.
    Intekhab

  • Weblogic 6.1 sp2 throws ClassNotFound exception in war files

    Hi there,
    I have a question related to Weblogic 6.1 SP2. I developed
    a servlet app deployed as a war file. Inside the war file,
    I included two jar files in WEB-INF\lib. One of the jar files
    is a third party library. The other one is inhouse developed
    client classes that will require access to the third party
    libraries. This scheme works fine under Weblogic 6.0 sp2.
    But, once I upgraded to 6.1 SP2, it throws ClassNotFound
    exception. I suspect the class loader is different from
    6.0. To test it out, I extract the third party library to
    WEB-INF\classes. It finds the classes from the library.
    My question is how could I make it work as the way it does
    under 6.0?
    Thank in advance.

    Hi Rock,
    6.1 SP2 has a known bug in the servlet container.
    If a jar file in the WEB-INF/lib has dots in it's name,
    classloader will not find classes in the jar.
    Example of such naming is common1.2.0.jar. The
    solution is simple. The jar should be renamed to
    not contain dots, like common.jar.
    Regards,
    Slava Imeshev
    "Rock Wang" <[email protected]> wrote in message
    news:3cc5d454$[email protected]..
    >
    Hi there,
    I have a question related to Weblogic 6.1 SP2. I developed
    a servlet app deployed as a war file. Inside the war file,
    I included two jar files in WEB-INF\lib. One of the jar files
    is a third party library. The other one is inhouse developed
    client classes that will require access to the third party
    libraries. This scheme works fine under Weblogic 6.0 sp2.
    But, once I upgraded to 6.1 SP2, it throws ClassNotFound
    exception. I suspect the class loader is different from
    6.0. To test it out, I extract the third party library to
    WEB-INF\classes. It finds the classes from the library.
    My question is how could I make it work as the way it does
    under 6.0?
    Thank in advance.

  • Accessing EJB from Console App.

    I have deployed in EJB with JNDI name "greeter" in Sun Java� System Application Server Platform Edition 8.
    Then i am trying to access EJB using a console app (given below).
    import javax.ejb.*;
    import javax.rmi.*;
    import java.util.*;
    import javax.naming.*;
    public class Client
    public static void main(String args[])
    Greeter myGreeterBean;
    GreeterHome myGreeterHome;
    Greeter myGreeterRemote;
    Context context = null;
    try
    context = new javax.naming.InitialContext();
    catch (Exception e)
    System.out.println( "Unable To Get Initial Context");
    return;
    System.out.println("Got Context...");
    try {
    String JNDIName = "greeter";
    Object objref = context.lookup(JNDIName);
    System.out.println("Got Access To Object");
    myGreeterHome =(GreeterHome) PortableRemoteObject.narrow(objref,
    GreeterHome.class);
    myGreeterRemote = myGreeterHome.create();
    String theMessage = myGreeterRemote.getGreeting();
    System.out.println(theMessage);
    catch(Exception ex) { System.out.println( ex.getMessage()); }
    } // end of main
    } // end of Client
    But, while i am running this program i am getting the following error:
    Got Context...
    Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    I don't know where i am wrong. Any idea about it ?
    Thank you,
    P.Srikanth.

    This is what you need to modify :)
    Hashtable env = new Hashtable();
    env.put(Context.INITIAL_CONTEXT_FACTORY, "<<your
    initial context factory>>");
    env.put(Context.PROVIDER_URL, "<<JNDI provider
    URL>>");
    // Check documentation for exact Strings to be set.
    // Pass the environment parameters to
    InitialContext.
    Context context = new InitialContext(env);
    Angel
    No this is not correct. Lookups in SUN AS works a bit differently.

  • How to access EJB deployed in JBOSS 4 from Creator

    Hello.
    I am trying to access EJBs deployed on JBOSS in order to develop a web app client, when I import the EJB set from Creator (sessions and entities packages in a jar file) I got the following error message....."No EJB set found in file....." .
    I presume there is an kind of xml file description specific for Sun App Server missing. I would like to know if there is other way to expose EJB in creator?....maybe write a config file by hand.
    I already read the tutorials related to EJB but those only use pre build EJB jars for Sun App Sserver.
    Also I read all the posted about JBoos and EJB in this forum but those are pretty general.
    By the way I have Delegate classes to access the EJB. How do I register my delegates in Creator in order to expose their methods?
    I�ll really appreciate some light in this matter.
    Thanks in advance!!!

    Hi,
    The below forum thread may help you :
    http://swforum.sun.com/jive/thread.jspa?forumID=123&threadID=51321
    Thanks,
    Runa.

  • Classnotfound exception in Studio

    I have this entity bean that I have deployed in weblogic. I am now trying to use
    the studio to create a business operation from one of the Bean methods. When I
    click on Configuration->Business Operations, I get a Classnotfound exception for
    the beans remote class.
    To get around this, I placed the bean jar file in the classpath in startweblogic.cmd
    for the domain. After this the problem went away and I was able to create the operation.
    Question is, is this the right way to have WLI find the class? Since I have deployed
    this in weblogic, shouldn't it be able to find the class files? What is the recommended
    way or am I doing something wrong.
    Thanks,
    --Krish.

    Use
    Class.forName("com.mysql.jdbc.Driver");Is the MySQL JDBC JAR file listed in project path.?

Maybe you are looking for

  • Error message on inventory server

    Hi! We get a error message on the Sybase Inventory server after a while that only says "Bad file number". The inventory database has stopped and the only way to restart it is to restart the server completly first. Any help why this happens? The OS is

  • FTP to JDBC Error

    Hi All,   I am trying to post a xml a simple XML file to JDBC... I have created a JDBC structure as ( my receiver is Oracle) OUTPUT_MT STATEMENT EMPLOYEE --- my table name action ( Value INSERT) TABLE (value EMPLOYEE my table name) access ID Name Age

  • Why does my web service web.xml reference a class that is not a servlet?

    In jDeveloper 10.1.3, I created the simplest web service I could think of. I created a HelloWorld class that has one method that accepts a name as a parameter and returns "Hello " + name. Using the wizards, I was able to get it to run just fine in my

  • IDeal payment system for the netherlands

    I am from the netherlands and don't have a credit card and don't always want to go to a store for a Code. So maybe it's a idea to add iDeal to the payment system of apple. Because everyone in the netherlands have that. And more poeple are going to bu

  • Passing Javascript values to JSP

    Hi, I have a select box and i get the selected value using the javascript. The variable that stores the value should be passed to the JSP. I need to know , how i an do the same. When a user clicks on a option I call a javascript function: function my