Startup class : Context lookup for a Home fails in a new thread

Hi All,
I am having a funny problem with Weblogic Startup class.In the startup method,
I am creating an instance of InitialContext. I called look up in this context
for a bean's home. It works and it retuns the proper Home interface.
But, when I use the same InitialContext instance in a new thread, and again if
I call look up for the same bean's home, the server fails with a SecurityException.
I don't have any Role based Security for this bean.
Btw, I am using Weblogic 5.1 & SP7.
Any ideas or help, appreciated..
Thanks in Advance
Srikanth Goli
Here is the code.
public String startup(String name, Hashtable args) throws Exception {
InitialContext initialContext = null;
try {
initialContext = new InitialContext();
UserPreferencesHome userPreferencesHome =
     (UserPreferencesHome)initialContext.lookup
     (UserPreferencesHome.DEFAULT_URL);
//This prints Properly
System.err.println("StartupTest: userPrefsHome is " + userPreferencesHome);
} catch(Exception e) {
e.printStackTrace();
Thread th = new Thread(new TestThread(initialContext));
th.start();
return "ok";
class TestThread implements Runnable {
Context context;
public TestThread(InitialContext ctx) {
context = ctx;
public void run() {
try {
//This is failing
UserPreferencesHome userPreferencesHome1 =
     (UserPreferencesHome)context.lookup
     (UserPreferencesHome.DEFAULT_URL);
System.err.println("UserPreferencesHome1 in the thread is " + userPreferencesHome1);
} catch(Exception e) {
e.printStackTrace();
Here is the exception, I am getting
java.lang.SecurityException: User "guest" does not have Permission "lookup" base
d on ACL "weblogic.jndi.com.capgroup.btps".
at weblogic.security.acl.Security.logAndThrow(Security.java:372)
at weblogic.security.acl.Security.checkPermission(Security.java:254)
at weblogic.jndi.internal.NamingSecurityManagerImpl.checkPermission(Nami
ngSecurityManagerImpl.java:98)
at weblogic.jndi.internal.NamingSecurityManagerImpl.checkLookup(NamingSe
curityManagerImpl.java:45)
at weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:
737)
at weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
at weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.capgroup.btps.server.TestThread.run(StartupTest.java:49)
at java.lang.Thread.run(Thread.java:484)

Hi All,
I am having a funny problem with Weblogic Startup class.In the startup method,
I am creating an instance of InitialContext. I called look up in this context
for a bean's home. It works and it retuns the proper Home interface.
But, when I use the same InitialContext instance in a new thread, and again if
I call look up for the same bean's home, the server fails with a SecurityException.
I don't have any Role based Security for this bean.
Btw, I am using Weblogic 5.1 & SP7.
Any ideas or help, appreciated..
Thanks in Advance
Srikanth Goli
Here is the code.
public String startup(String name, Hashtable args) throws Exception {
InitialContext initialContext = null;
try {
initialContext = new InitialContext();
UserPreferencesHome userPreferencesHome =
     (UserPreferencesHome)initialContext.lookup
     (UserPreferencesHome.DEFAULT_URL);
//This prints Properly
System.err.println("StartupTest: userPrefsHome is " + userPreferencesHome);
} catch(Exception e) {
e.printStackTrace();
Thread th = new Thread(new TestThread(initialContext));
th.start();
return "ok";
class TestThread implements Runnable {
Context context;
public TestThread(InitialContext ctx) {
context = ctx;
public void run() {
try {
//This is failing
UserPreferencesHome userPreferencesHome1 =
     (UserPreferencesHome)context.lookup
     (UserPreferencesHome.DEFAULT_URL);
System.err.println("UserPreferencesHome1 in the thread is " + userPreferencesHome1);
} catch(Exception e) {
e.printStackTrace();
Here is the exception, I am getting
java.lang.SecurityException: User "guest" does not have Permission "lookup" base
d on ACL "weblogic.jndi.com.capgroup.btps".
at weblogic.security.acl.Security.logAndThrow(Security.java:372)
at weblogic.security.acl.Security.checkPermission(Security.java:254)
at weblogic.jndi.internal.NamingSecurityManagerImpl.checkPermission(Nami
ngSecurityManagerImpl.java:98)
at weblogic.jndi.internal.NamingSecurityManagerImpl.checkLookup(NamingSe
curityManagerImpl.java:45)
at weblogic.jndi.toolkit.BasicWLContext.resolveName(BasicWLContext.java:
737)
at weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:133)
at weblogic.jndi.toolkit.BasicWLContext.lookup(BasicWLContext.java:574)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.capgroup.btps.server.TestThread.run(StartupTest.java:49)
at java.lang.Thread.run(Thread.java:484)

Similar Messages

  • Push Notifications: DNS Lookup for pubsub.localhost failed

    Hello,
    after a server crash and restore i cant manage to get push notifications back working. When adding a caldav account to ical, it doesnt offer "Push" in "Refresh Calendars" option anymore. Everything in the log files seems to look fine but this:
    6/4/12 11:45:26.024 AM jabberd_notification/s2s: dns lookup for pubsub.localhost failed
    Can someone help me out on this please?

    Some more info. I think its just the last line which fails. Everything else looks like it works…
    DNS seems fine as well.
    6/4/12 5:32:37.179 PM jabberd_notification/c2s: [8] [::ffff:127.0.0.1, port=50810] connect
    6/4/12 5:32:37.217 PM jabberd_notification/c2s: Authentication succeeded, mech: DIGEST-MD5 client IP: ::ffff:127.0.0.1 client port: 50810 username: com.apple.notificationuser
    6/4/12 5:32:37.219 PM jabberd_notification/c2s: [8] SASL authentication succeeded: mechanism=DIGEST-MD5; authzid=com.apple.notificationuser@localhost, TLS negotiated
    6/4/12 5:32:37.223 PM jabberd_notification/c2s: [8] bound: jid=com.apple.notificationuser@localhost/icalserver.3c311a83d7b04f1a977481cfea6 c8d9e
    6/4/12 5:32:37.224 PM jabberd_notification/sm: session started: jid=com.apple.notificationuser@localhost/icalserver.3c311a83d7b04f1a977481cfea6 c8d9e
    6/4/12 5:32:37.233 PM jabberd_notification/s2s: dns lookup for pubsub.localhost failed

  • Lookup for local home interface

    Hi!
    I am using the j2eesdk and there is a thing I cannot find anywhere:
    When I use a local interface for a bean and define an EJB Ref on that bean in the 'deploytool', I cannot specify a JNDI name (only a bean name). Therefore I cannot map the coded name in my Context-lookup() call in the code to any JNDI name on the applications 'JNDI Names' tab.
    My question is:
    - how do I lookup local home interfaces?
    - if this is done via JNDI, how do I do this in the deploytool?
    Kind Regards
    Ralf

    Hi
    The point u all should understand is you use a jndi name in your programs
    say
    public static void main(String[] args)
    InitalContext ctx = new IntialContext();
    ctx=(Context)ctx.lookup("java:comp/env");
    DemoLocalHome home = ctx.lookup("ejb/DemoBean");
    in the above program you use "ejb/DemoBean" as a reference name, but actually there won't be a Bean registered with that name. so, when u deploy the appclient u should map the reference name with the actual JNDI name ( if it's a remote interface) or with the class name (Local interface)
    so, when u deploy the appclient in the "ejb ref " tab, u specify that it uses Local interfaces and in the end u don't map the refernce name to a JNDI name( because it's a local interface) and rather u speciy the class name.
    that's how u map the references for Remote and Local home interfaces.....
    thank's for listening to that......
    for more suggestions mail me at [email protected]

  • JNDI lookup for external SessionBean fails

    Hello, i have a problem i've been trying to solve all day and would appreciate it if you could help me.
    I have an Ear file with an EJB Session Bean(EAR: EigenlijstenEar/EJB: EigenlijstenEJB) which i am attempting to use in a servlet in another web/ear (Web: HagaPortalWeb/EAR: HagaPortalEar). I have read and followed the guidance of http://help.sap.com/saphelp_nw04/helpdata/en/55/29ed5eff965448941c0b42f01b9804/frameset.htm, but to no avail.
    The error i get is: com.sap.engine.services.jndi.persistent.exceptions.NamingException: Exception during lookup operation of object with name webContainer/applications/hagaziekenhuis.nl/HagaPortalEar/HagaPortalWeb/java:comp/env/ejb/EigenlijstenSessionBean, cannot resolve object reference. [Root exception is com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at EigenlijstenEar, the whole lookup name is localejbs/hagaziekenhuis.nl/EigenlijstenEar/EigenlijstenSessionBean.]
    my lookup code in a servlet in HagaPortalWeb:
    Context ctx = new InitialContext();
    EigenlijstenSessionLocalHome eigenlijstenHome =
         (EigenlijstenSessionLocalHome) ctx.lookup(
                             "java:comp/env/ejb/EigenlijstenSessionBean");
    content of my web.xml in HagaPortalWeb:
         <ejb-local-ref>
              <ejb-ref-name>ejb/EigenlijstenSessionBean</ejb-ref-name>
              <ejb-ref-type>Session</ejb-ref-type>
              <local-home>nl.hagaziekenhuis.medisurf.ejbs.eigenlijsten.EigenlijstenSessionLocalHome</local-home>
              <local>nl.hagaziekenhuis.medisurf.ejbs.eigenlijsten.EigenlijstenSessionLocal</local>
              <ejb-link/>
         </ejb-local-ref>
    content of my application-j2ee-engine.xml in Ear project HagaPortalEar:
         <reference
              reference-type="hard">
              <reference-target
                   provider-name="hagaziekenhuis.nl"
                   target-type="application">EigenlijstenEAR</reference-target>
         </reference>

    HI Arie,
    If you are accessing enterprise beans with J2EE clients (servlets, JSP, other enterprise beans, J2EE application clients), do not specify and use this arbitrary JNDI name. Instead, define EJB references in the clientsu2019 deployment descriptors and access the beans using these references. For more information, check the following link
    http://help.sap.com/saphelp_nw04/helpdata/en/a0/019b3e25f95f14e10000000a114084/content.htm
    if the above does not work try the following:--
    Try to lookup the Ejb by its JNDI name given in the EJB-J2ee-engine.xml file if it does not exist there  give any valid name and try to lookUp.
    or try to lookup the ejb by its default jndi name.
    "localejbs/bean name>"
    http://help.sap.com/saphelp_nw04/helpdata/en/38/3e5a4201301453e10000000a155106/frameset.htm
    in the Above link refer the second option "Lookup from a Non-J2EE Java Application"
    Siddharth
    Edited by: Siddharth Jain on Aug 22, 2008 7:13 AM

  • Lookup for local interfaces.

    Isn't lookup for local interfaces allowed from web client. I have defined a
    ejb-reference for the bean in my web.xml. When I do a lookup as
    TestBeanLocalHome home = (TestBeanLocalHome)
    ic.lookup("java:comp/env/ejb/TestBeanLocal");
    This statement result in an error
    javax.naming.NameNotFoundException: Unable to resolve
    comp/env/ejb/TestSLSBeanLocal/ Resolved: 'comp/env/ejb'
    Unresolved:'TestBeanLocal' ; remaining name ''
    at
    weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingN
    ode.java:887)
    at
    weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:219)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:183)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:339)
    at
    weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWr
    apper.java:36)
    at
    weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124
    at javax.naming.InitialContext.lookup(InitialContext.java:345)
    at jsp_servlet.__client._jspService(__client.java:108)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    The same thing works when lookup is done for remote interface.
    Regards,
    Rupesh.

    You need to use "ejb-local-ref" to refer to local interfaces. I meant
    "ejb-local-ref" element was not available in web.xml in Servlet 2.2. They
    were added in Servlet 2.3 specification. So unless your app server is
    Servlet 2.3 compliant it does not need to support references to local
    interfaces in web components (servlets or jsps). Weblogic 6.1 did not seem
    to support them last time I tried.
    -- Anand
    "Rupesh" <[email protected]> wrote in message
    news:[email protected]...
    what do u mean by local interface in web component? its ejb's local
    interfaces and lookups are any way being
    done using ejb-ref and ref mapping are given in weblogic.xml.
    Where does Servlet spec come into the picture?
    Do you mean to say that you can not lookup for local home from a jsp in
    WL6.1?
    Regards,
    Rupesh.
    Anand Byrappagari <[email protected]> wrote in message
    news:[email protected]...
    Are you using Weblogic 6.1? Then local interfaces in web components arenot
    supported. Local interfaces were added only in Servlet 2.3 I think.Weblogic
    6.1 is not completely compliant with Servlet 2.3.
    -- Anand
    "Rupesh" <[email protected]> wrote in message
    news:[email protected]...
    Isn't lookup for local interfaces allowed from web client. I have
    defined
    a
    ejb-reference for the bean in my web.xml. When I do a lookup as
    TestBeanLocalHome home = (TestBeanLocalHome)
    ic.lookup("java:comp/env/ejb/TestBeanLocal");
    This statement result in an error
    javax.naming.NameNotFoundException: Unable to resolve
    comp/env/ejb/TestSLSBeanLocal/ Resolved: 'comp/env/ejb'
    Unresolved:'TestBeanLocal' ; remaining name ''
    at
    weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(BasicNamingN
    ode.java:887)
    at
    weblogic.jndi.internal.BasicNamingNode.lookupHere(BasicNamingNode.java:219)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:183)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    atweblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:191)
    atweblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:339)
    at
    weblogic.jndi.factories.java.ReadOnlyContextWrapper.lookup(ReadOnlyContextWr
    apper.java:36)
    at
    weblogic.jndi.internal.AbstractURLContext.lookup(AbstractURLContext.java:124
    at javax.naming.InitialContext.lookup(InitialContext.java:345)
    at jsp_servlet.__client._jspService(__client.java:108)
    at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :265)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
    :200)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
    ntext.java:2495)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
    :2204)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
    The same thing works when lookup is done for remote interface.
    Regards,
    Rupesh.

  • Failed to invoke startup class "MyStartup Class"

    Hi,
    I configured StartUpClass.java in Weblogic server through Admin Console . Also I set the required jar files in the classpath of the server in WL_HOME\server\bin\startWLS.cmd.
    This StartUPClass is written to initialize and create the minimum number of objects in the pool, needed for URLConnection using ObjectPooling API.
    I am getting Exceptions while starting the server after deployment of the application. I am pasting the full stack trace.
    <Feb 1, 2007 9:49:55 AM IST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) Client VM Version 1.4.2_12-b03 from Sun Microsystems Inc.>
    <Feb 1, 2007 9:50:10 AM IST> <Info> <Configuration Management> <BEA-150016> <This server is being started as the administration server.>
    <Feb 1, 2007 9:50:10 AM IST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 8.1 SP4 Mon Nov 29 16:21:29 PST 2004 471647
    WebLogic XMLX Module 8.1 SP4 Mon Nov 29 16:21:29 PST 2004 471647 >
    <Feb 1, 2007 9:50:11 AM IST> <Notice> <Management> <BEA-140005> <Loading domain configuration from configuration repository at D:\bea\user_projects\domains\nessdomain\.\config.xml.>
    <Feb 1, 2007 9:50:15 AM IST> <Notice> <Log Management> <BEA-170019> <The server log file D:\bea\user_projects\domains\nessdomain\myserver\myserver.log is opened. All server side log events will be written to this file.>
    <Feb 1, 2007 9:50:18 AM IST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
    <Feb 1, 2007 9:50:18 AM IST> <Notice> <WebLogicServer> <BEA-000327> <Starting WebLogic Admin Server "myserver" for domain "nessdomain">
    <Feb 1, 2007 9:50:31 AM IST> <Warning> <HTTP> <BEA-101248> <[Application: 'D:\MSM\Workspace\MSM2.0Jan9', Module: 'MSM31']: Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)". (line 96, column 11).>
    <Feb 1, 2007 9:50:31 AM IST> <Warning> <HTTP> <BEA-101248> <[Application: 'D:\MSM\Workspace\MSM2.0Jan9', Module: 'MSM31']: Deployment descriptor "weblogic.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: The content of element type "weblogic-web-app" must match "(description?,weblogic-version?,security-role-assignment*,run-as-role-assignment*,reference-descriptor?,session-descriptor?,jsp-descriptor?,auth-filter?,container-descriptor?,charset-params?,virtual-directory-mapping*,url-match-map?,preprocessor*,preprocessor-mapping*,security-permission?,context-root?,wl-dispatch-policy?,servlet-descriptor*,init-as*,destroy-as*)". (line 23, column 20).>
    <Feb 1, 2007 9:50:35 AM IST> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "MyStartup Class", java.lang.ClassNotFoundException: com.helio.msm.ws.util.StartUpClass
    java.lang.ClassNotFoundException: com.helio.msm.ws.util.StartUpClass
         at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
         at java.security.AccessController.doPrivileged(Native Method)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:156)
         at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
         at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:121)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:116)
         at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentStartupService.java:63)
         at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
         at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
         at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
         at weblogic.Server.main(Server.java:32)
    >
    <Feb 1, 2007 9:50:36 AM IST> <Error> <Socket> <BEA-000438> <Unable to load performance pack. Using Java I/O instead. Please ensure that wlntio.dll is in: 'D:\j2sdk1.4.2_12\bin;.;C:\WINDOWS\system32;C:\WINDOWS;D:\j2sdk1.4.2_12\bin;c:\windows\system32;C:\apache-ant-1.6.5\bin;'
    >
    <Feb 1, 2007 9:50:36 AM IST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "myserver" for domain "nessdomain" running in Development Mode>
    <Feb 1, 2007 9:50:36 AM IST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
    <Feb 1, 2007 9:50:36 AM IST> <Notice> <WebLogicServer> <BEA-000355> <Thread "ListenThread.Default" listening on port 7001, ip address *.*>
    <Feb 1, 2007 9:50:55 AM IST> <Warning> <Socket> <BEA-000402> <There are: 5 active sockets, but the maximum number of socket reader threads allowed by the configuration is: 4. You may want to alter your configuration.>
    Please help me in resolving this problem. I need it asap
    Thanks,
    Dharani

    I should be more specific and have a bit more to add....
    We have our app in an .ear file. I find that when I put the startup
    classes in a seperate directory which is in the classpath specified in the
    startWeblogic.cmd file they will be run on startup. I don't think I should
    have to do this since these files exist in the ear file. I think this is
    causing other problems too such as an illegalAccessError I get when an EJB
    tries to load a class which was previously accessed by the startup classes.
    Thanks,
    Steve
    Steve Snodgrass wrote:
    Hi,
    I am beggining to upgrade our app from Weblogic 5.1 to 6.0. So far it
    has been progressing nicely and everything works with one exception. I
    can not get the start up classes to run. I get the following exception:
    <Failed to invoke startup class "MyStartup Class",
    java.lang.ClassNotFoundException:
    followed by my fully qualified class name. The class is reference
    elsewhere in the code and works fine. Is a seperate classpath used for
    startup classes? If not why might Weblogic have a hard time finding my
    class?
    Thanks,
    Steve

  • Failed to use EJB's from startup class

    Hi,
    we use a startup class to set up some base services of our application.
    The startup class must call some remote methods in a EJB. Unfortunately
    a CLassCastException is thrown when we try to create the EJB by calling
    the create method on its home interface:
    Fr Nov 17 10:47:50 GMT+01:00 2000:<I> <WebLogicServer> Invoking
    T3StartupDef ibs
    startup ch.ebs.ibs.IBSStartup with {}
    java.lang.ClassCastException: weblogic.t3.srvr.StartupThread
    at
    weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:34)
    at
    weblogic.rmi.extensions.BasicRequestDispatcher.dispatch(BasicRequestD
    ispatcher.java:82)
    at
    weblogic.rmi.internal.ServerRequest.sendOneWay(ServerRequest.java:73)
    at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:77
    at
    ch.ebs.ibs.ejb.SessionControllerEJBHomeImpl_WLStub.create(SessionCont
    rollerEJBHomeImpl_WLStub.java:151)
    at ch.ebs.ibs.IBSStartup.startup(IBSStartup.java:69)
    at
    weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:146)
    at
    weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    The same code works fine if we run it as client code (not in the startup
    sequence).
    Any idea?
    Thanks Pascal

    Regarding your problem and the remark you posted to my question in "Calling
    EJBs from a thread in a startup class": It is possible to call methods of an
    EJB from a startup class. I use this functionality to route messages from
    JMS to my EJBs. From what you say, I assume that you are calling the EJB
    from your startup method, which might be a problem, since WL is not
    initialized at this point and does not accept any connections (this
    obviously includes internal connections). You should wait for this phase to
    finish and then use some other mechanism (e.g. a JMS message) to trigger
    your startup class to invoke any home or remote methods on the EJB.
    Looking at your stack trace, I am reminded of a very similar exception I
    encountered when I was experimenting with WL a short while ago. I had put my
    EJB jar file on WL's JAVA_CLASSPATH, just to see how the different
    classloaders work. Of course I don't know if this has any relevance to your
    configuration.
    Andy
    PS: The only exception to what I wrote in the first paragraph seems to be if
    you start a new thread from the startup class. I still haven't managed to
    call my EJB from this thread.
    Pascal Rudin wrote:
    Hi,
    we use a startup class to set up some base services of our application.
    The startup class must call some remote methods in a EJB. Unfortunately
    a CLassCastException is thrown when we try to create the EJB by calling
    the create method on its home interface:
    Fr Nov 17 10:47:50 GMT+01:00 2000:<I> <WebLogicServer> Invoking
    T3StartupDef ibs
    startup ch.ebs.ibs.IBSStartup with {}
    java.lang.ClassCastException: weblogic.t3.srvr.StartupThread
    at
    weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
    tHandler.java:34)
    at
    weblogic.rmi.extensions.BasicRequestDispatcher.dispatch(BasicRequestD
    ispatcher.java:82)
    at
    weblogic.rmi.internal.ServerRequest.sendOneWay(ServerRequest.java:73)
    at
    weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:77
    at
    ch.ebs.ibs.ejb.SessionControllerEJBHomeImpl_WLStub.create(SessionCont
    rollerEJBHomeImpl_WLStub.java:151)
    at ch.ebs.ibs.IBSStartup.startup(IBSStartup.java:69)
    at
    weblogic.t3.srvr.StartupThread.runStartup(StartupThread.java:182)
    at weblogic.t3.srvr.StartupThread.doWork(StartupThread.java:146)
    at
    weblogic.t3.srvr.PropertyExecuteThread.run(PropertyExecuteThread.java
    :62)
    The same code works fine if we run it as client code (not in the startup
    sequence).
    Any idea?
    Thanks Pascal

  • Failed to invoke startup class "SOAStartupClass"

    Hi all,
    1. WLS domain (wls 10.3.5 on Linux, Middleware 11.1.1.5.0) is extended with OIM and SOA Suite.
    2. AdminServer is started by wlst.sh script, node manager runs with StartScriptEnabled=true
    wls_soa1 is up and running, but soa-infra fails to start with following error:
    ####<Feb 14, 2012 3:30:28 PM CET> <Critical> <WebLogicServer> <vfusion01.fss-group.com> <wls_soa1> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1329229828020> <BEA-000286> <Failed to invoke startup
    class "SOAStartupClass", java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey
    java.lang.ClassNotFoundException: oracle.bpel.services.common.util.GenerateBPMCryptoKey
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:247)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClass(ClassDeploymentManager.java:262)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.access$000(ClassDeploymentManager.java:54)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager$1.run(ClassDeploymentManager.java:214)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.invokeClassDeployment(ClassDeploymentManager.java:246)
    at weblogic.management.deploy.classdeployment.ClassDeploymentManager.runStartupsBeforeAppDeployments(ClassDeploymentManager.java:149)
    at weblogic.management.deploy.classdeployment.ClassDeploymentService.start(ClassDeploymentService.java:21)
    at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    I have re-installed twice both SOA Suite and domain, but I always end up with this error.
    The same problem has been already reported e.g. here: Fusion MIddleware 11g , but I haven't found any final solution yet.
    I've tried to play also with permissions of ../Oracle_SOA1/soa/modules/oracle.rules_11.1.1/rules.jar, but without success.
    Any idea how to solve this?
    Thanks for support
    DanielF

    Check Can not start managed servers using Node Manager
    hth,
    Peter Paul

  • Failed to invoke Startup class

    Hi,
    Currently I have moved to weblogic 7 to 11g.
    I am facing a problem while invoking a start up class which uses a Statless session bean.
    I am getting the NameNotFOund exception while doing the bean look up with the proper JNDI name.
    The same is working in weblogic 7.
    Please suggest a way around.
    Thanks in advance :)

    aarone wrote:
    >
    When I attempt to startup Weblogic, I get the error "Failed to invoke startup class
    weblogic.jdbc.common.internal.JdbcStartup = weblogic.jdbc.common.internal.JdbcStartup
    java.security.AccessControlException" access denied ( java.sql.SQLPermission setLog
    I've checked and rechecked my properties file, class permission, class path........
    Any ideas what to try next?edit your weblogic.policy file, and add this line to the last clause:
    permission java.sql.SQLPermission "setLog";
    Joe
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
    for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
    Send resumes to [email protected]

  • Failed to invoke startup class "ClusteredMQJMSStartup", java.lang.ClassNotFoundException

              Windows 2000
              BEA WLS 8.1 SP1
              Created a config based on the template for a WLS with Workshop - "cgServer".
              Changed <configdir>/startWeblogic.cmd to include the extra classes I need to execute
              my startup class.
              Added 2 new servers via the Admin console (http://localhost:7001/) entitled "cgServer2"
              and "cgServer3"
              Added a cluster and added cgServer2 and cgServer3 to the cluster.
              Targetted startup class to the cluster.
              Stop everything.
              Start cgServer via the startWeblogic.cmd script - OK.
              Start cgServer2 via the startManagedWeblogic.cmd script - OK.
              Start cgServer3 via the startManagedWeblogic.cmd script - OK.
              BUT
              if I try and start the managed servers via the admin console, each server reports
              that it cannot find the startup class:
              <11-Feb-2004 11:00:34 o'clock CET> <Critical> <WebLogicServer> <BEA-000286> <Failed
              to invoke startup class "ClusteredMQJMSStartup", java.lang.ClassNotFoundException:
              demo.MQJMSStartup
              Failed to invoke startup class "ClusteredMQJMSStartup", java.lang.ClassNotFoundException.
              What have I missed in the configuration of the Node Manager (I assume it is that)?
              I want cgServer to be the admin server and cgServers 2 and 3 to be my application
              servers, and I will not have everything on the same machine, so I need to use
              the Admin console to manage the cluster and ind its managed-servers.
              FYI - the same code with the same configuration for a single server (no cluster)
              works fine.
              Thanks in advance ... KSS
              

    Check your Startup class code...Are u trying to read any "*.properties" file ?
    It is possible that that particular properties file is present only in ManagedServer1 Box and Not in the ManagedServer2 & 3 boxes.

  • Failed to invoke startup class "JMX Startup Class", java.lang.NullPointerEx

    Hi,
    we have a clustered env of 3 managed servers, while starting managed servers in 2nd and 3rd managed servers i am getting following exception can any one sugguest me to get out of this exception
    <Oct 15, 2010 2:35:45 PM EDT> <Critical> <WebLogicServer> <BEA-000286> <Failed to invoke startup class "JMX Startup Class", java.lang.NullPointerException
    java.lang.NullPointerException
    at com.bellsouth.erepair.egate.framework.jmx.PropertyCache.main(Unknown Source)
    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:597)
    Truncated. see log file for complete stacktrace
    Regards
    giri

    Check your Startup class code...Are u trying to read any "*.properties" file ?
    It is possible that that particular properties file is present only in ManagedServer1 Box and Not in the ManagedServer2 & 3 boxes.

  • Class not found exception for the startup class defined.

    iam using weblogic server 10 and bea jrockit 1.5.0.12.
    i have created a startup class in the admin console for a web project and i have deployed the war file using the console in a user defined domains, user project directory.
    when i start the server, iam getting class not found exception for the startup class.
    But, the startup class is available in the web archive (war). how should we add the classes and jars in the war to the classpath in setDomainEnv.sh or is there any other setting available in the console to enable this.

    Hello Julius,
    yes sure, we can move this post to the NW admin forum. I have already posted similar thread on sun forums. I was hoping that someone from SAP SDN already tackled this problem and if not someone specialized in J2EE Engine could troubleshoot me from the class problem I'm getting. I don't know if it's specific from the agent or if this ClassNotFound is a general SAP J2EE Engine error relating to a library not correclty defined.
    Kind regards,
    Tanguy Mezzano

  • Security settings for startup class

    Hi,
    I use WL6.1 (sp2) where the "guest" user is disabled and server starts up with
    "system" user. All beans are permitted to be launched using other user "user1"
    and not "system" user. And the jar file with beans and other staff is deployed
    well, except of one thing:
    I have startup class in the application and it doesn't work. When trigger method
    is launched, the following exception is thrown:
    <WispConfiguration: Can't connect to bean. No configuration avaiable java.rmi.AccessException:
    Security violation: insufficient permission to access method; nested exception
    is: java.lang.SecurityException: Security violation: insufficient permission
    to access method>
    As i understand this is the security problem. How could I configure weblogic
    to make him to use "user1" instead of "system" when running startup class? Where
    should I define it: in startup() method of startup class or in configuration files
    of WL?
    Any help/hint will be very appreciated.
    THANKS
    Orly

    racb wrote:
    i took all the folders out and restarted and the same message came up that the startupitems folder is insecure and a second message saying that folder DS_Store in the startupitems folder is disabled because of insecure settings. Now I can not see that folder in the startup items folder, any idea
    Probably just as it says, DS_Store is corrupt. This stores the settings for a folder.
    To see if we can find the invisible folder and remove it open Terminal in your Utilities folder and at the prompt copy and paste defaults write com.apple.finder AppleShowAllFiles True; killall Finder
    If you can see the file now just delete it.
    Then, switch back to visibles only and create a new folder called Startup Items.
    defaults write com.apple.finder AppleShowAllFiles False; killall Finder
    Or, simply creating a new Startup Items folder may be enough.
    -mj

  • How to implement Startup class for OC4J

    I'm in the process of converting my current J2EE application from weblogic 5.1 to OC4J.
    I have startup class that would set application specific properties by reading property file. In addition, this class would also check for certain resource availability (like database) during weblogic startup. I could not find similar option in OC4J.
    Any help to convert this startup class for OC4J would be highly appreciated.
    Thanks
    Sankaran.

    Hi Sankaran,
    Your eMail address suggests you work for Oracle. Do you? Can't someone
    at Oracle help you?
    I imagine that Oracle would have some kind of agreement with Ironflare
    as well. Can't someone at Ironflare help you?
    But remember, with application servers (as with RDBMSs), no two are the
    same. Each one offers the same functionality, but using different methods
    to achieve that functionality. I don't know how to do it, but I'm sure
    you can check database availability when starting up OC4J -- just not
    the same way you do it in Weblogic.
    Good Luck,
    Avi.

  • BEA-000286 Failed to invoke startup class

    Have created a class which implements T3StartupDef has a setServices and startup methods. Put inside a JAR which is the WLS 8.1 sp3 Classpath.
    Have deployed the startup class from the WL Console;
    Deployments | Startup & Shutdown. Given the class the full package name.
    However when WLS starts I get;
    <30-Sep-2004 17:57:46 o'clock BST> <Critical> <WebLogicServer> <BEA-000286> <Fai
    led to invoke startup class "NOTiFYMonitorListener", java.lang.ClassNotFoundException: uk.co.notify.agent.NOTiFYMonitorListener
    java.lang.ClassNotFoundException: uk.co.notify.agent.NOTiFYMonitorListener
    at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:141)
    at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.
    java:156)
    at weblogic.t3.srvr.StartupClassService.access$000(StartupClassService.java:36)
    at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:1
    21)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
    at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassS
    ervice.java:116)
    at weblogic.t3.srvr.PostDeploymentStartupService.resume(PostDeploymentSt
    artupService.java:63)
    at weblogic.t3.srvr.SubsystemManager.resume(SubsystemManager.java:131)
    at weblogic.t3.srvr.T3Srvr.resume(T3Srvr.java:966)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:361)
    at weblogic.Server.main(Server.java:32)
    Any pointers? Thanks

    Thanks for that. Followed your instructions now get;
    Your environment has been set.
    C:\bea\weblogic81\server\bin>
    C:\bea\weblogic81\server\bin>
    C:\bea\weblogic81\server\bin>javap uk.co.notify.agent.NOTiFYMonitorListener
    Compiled from "NOTiFYMonitorListener.java"
    public class uk.co.notify.agent.NOTiFYMonitorListener extends java.lang.Object i
    mplements uk.co.notify.ejb.utilities.NOTiFYConstants,weblogic.common.T3StartupDe
    f{
    static java.lang.Class class$uk$co$notify$agent$NOTiFYMonitorListener;
    weblogic.management.runtime.LogBroadcasterRuntimeMBean logBroadcaster;
    weblogic.management.MBeanHome mBeanHome;
    static uk.co.notify.valueobjects.NotificationVO notificationVO;
    static java.lang.String password;
    weblogic.management.RemoteMBeanServer rmbs;
    java.lang.String sDomainName;
    static java.lang.String serverName;
    static java.lang.String url;
    static java.lang.String userName;
    public uk.co.notify.agent.NOTiFYMonitorListener();
    static java.lang.Class class$(java.lang.String);
    public static void main(java.lang.String[]);
    public void setServices(weblogic.common.T3ServicesDef);
    public void startListening();
    public java.lang.String startup(java.lang.String,java.util.Hashtable);
    throws java/lang/Exception
    Still get ClassNotFoundException. Is the JAR containing my NOTiFYListener class being loaded or not?

Maybe you are looking for

  • I updated my phone and it has deleted the factory apps off of it and i dont know how to get them back help please

    i updated my phone and it deleted everything even the factory apps how do i get them back

  • How to transfer iPhoto pics?

    I just can't seem to transfer my Iphoto pics and videos from my macbook pro to my new 5C Iphone? I know Itunes is somehow involved, but i can't make it work. Help?????   :-)

  • Cell Count mismatch when creating a Partition

    <p>Hi,</p><p> </p><p>I have a ASO outline with just 1 scenario "Actuals"where as I created a BSO outline with exactly same dimensionsexcept Scenario dimension which has write-back members"Budget" and etc.</p><p> </p><p>ASO outline has no ( a few rati

  • Loading cover doesn't work

    I just updated itunes on version 7.3.1. Unfortunately loading covers is not possible. When I click on "Load Cover" I get a error message: "A cover couldn't be found. Unkown error -609" But the cover I wanted to load exists in the itunes Store. It wor

  • Filtering of messages in Topic

    Hi i have a requirement like i would be having multiple messages in a TOPIC which are of store messages(store 1-10).how can i filter or pick only those messages which are of store 1 or 2 etc and my remaining messages shouldn't be lost. Regards, Ravi