Startup class question
Hi,
I haven't used startup classes but see a need for one now, to add a JMS
receiver of messages. We're not on WL 6.0 yet and that doesn't appear to be
an option. Anyway, my question relates to threading. Are startup classes
like EJB's
in that the server will instantiate > 1 if needed?
Thanks,
Bill
Bill,
Your threading needs depend on how you are using JMS. If you are using
asynchronous delivery then the thread is provided by the JMS runtime when it
makes the callback on to your listener.
If you hope to use synchronous delivery then you'll need a thread to receive
messages. A startup class could probably start a thread (or a pool of them)
and use them to handle synchronous messages. However I would strongly
recommend against this.
You might investigate Message Driven EJBs. I suspect that they will be a
better fit for your needs than a startup class.
Regards,
Adam
"Bill Ennis" <[email protected]> wrote in message
news:[email protected]..
Hi,
So if there is only one instance what happens if multiple requests come in
at the same time?
BTW, the startup class I am working on will be for a JMS client.
I suppose you could thread the startup class?
Where can I find detailed info on Startup classes beyonnd what have found
in the developers manual?
Thanks alot,
Bill
"Bill Ennis" <[email protected]> wrote in message
news:3a69eaad$[email protected]..
Hi,
I haven't used startup classes but see a need for one now, to add a JMS
receiver of messages. We're not on WL 6.0 yet and that doesn't appear tobe
an option. Anyway, my question relates to threading. Are startup classes
like EJB's
in that the server will instantiate > 1 if needed?
Thanks,
Bill
Similar Messages
-
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 PascalRegarding 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 -
Refering to startup class in EJB
Hi,
In our application we send exception stacktrace as email to
System Admin.The mails are sent from both Web App and EJB.
The emails have to be buffered and can be sent only after a
limit say 5 stacktraces have been reached. Also in case the
buffer is not full,then the mail should be sent only after a
specific time.
To achieve this I am planning to use a Startup class and start
a thread inside the class to wait for a specified time. The questions are:
1)How to refer to a startup class in EJB or Web (Our
application is deployed as an EAR)
2) If we can refer to the startup class in EJB,is it ok to refer a thread -will
the thread
created by startup class be in the context of the EJB.
ManiStartup classes have the following deficiences:
- they (and all application classes they use) have to be in the system
classpath, which makes them non-redeployable
- they are executed only once when server starts - if your application can be
hot-redeployed and it depends on startup/shutdown logic things can break.
An easy workaround is to use load-on-startup servlet init() and destroy()
methods (or 2.3 servletcontext listener) instead of startup classes - it makes
application redeployable and portable.
Mani <[email protected]> wrote:
Hi,
In our application we send exception stacktrace as email to
System Admin.The mails are sent from both Web App and EJB.
The emails have to be buffered and can be sent only after a
limit say 5 stacktraces have been reached. Also in case the
buffer is not full,then the mail should be sent only after a
specific time.
To achieve this I am planning to use a Startup class and start
a thread inside the class to wait for a specified time. The questions are:
1)How to refer to a startup class in EJB or Web (Our
application is deployed as an EAR)
2) If we can refer to the startup class in EJB,is it ok to refer a thread -will
the thread
created by startup class be in the context of the EJB.
Mani--
Dimitri -
I am using startup classes to initially populate my JNDI tree with
values (Strings) and LinkRefs (to other server JNDI trees).
* How can I control the order in which the startup classes are invoked?
Some of my startup classes place values in the JNDI tree. Other startup
classes take those values and do other things with them. I want to make
sure the value setters and run before the value users. WLS 5.1 had this
capability. I don't see it in 6.0
* How can I get some startup classes to be invoked before EJBs are
loaded and others to be invoked after EJBs are loaded? I need to setup
my LinkRefs before the EJBs attempt to build the java:comp/env local
environment for the EJBs. Other times I need to promote the EJBs Home
references outside the server. I believe that startup classes only run
after the EJB instantiations based on 5.1 experience.
thanks
jimJim and Joe,
For the First Question I believe there is a better way of doing with
making your Startup classes Invoked in the order You wanted and also make
them J2EE complaint..
Make your startup classes as start up servlets by registering them in
web.xml as startup servlets(<load-on-startup>).
While registering a startup servlet remeber that the element can have a
optional element. The optional contents of these element must be a positive
integer indicating the order in which the servlet should be loaded. Lower
integers are loaded before higherintegers.
If you need more explanation let me know, I can provide you example on the
same.
Kumar.
jim stafford wrote:
I am using startup classes to initially populate my JNDI tree with
values (Strings) and LinkRefs (to other server JNDI trees).
* How can I control the order in which the startup classes are invoked?
Some of my startup classes place values in the JNDI tree. Other startup
classes take those values and do other things with them. I want to make
sure the value setters and run before the value users. WLS 5.1 had this
capability. I don't see it in 6.0
* How can I get some startup classes to be invoked before EJBs are
loaded and others to be invoked after EJBs are loaded? I need to setup
my LinkRefs before the EJBs attempt to build the java:comp/env local
environment for the EJBs. Other times I need to promote the EJBs Home
references outside the server. I believe that startup classes only run
after the EJB instantiations based on 5.1 experience.
thanks
jim -
Cannot start Startup class in WL6.0
Hi, I have a question regarding the startup class with WL6.0. here is the config.xml:
=================================================================
<StartupClass
Arguments="connectionFactory=javax.jms.QueueConnectionFactory,queue=com.lasso.email.emailQueue"
ClassName="com.lasso.service.mail.StartupEmailSender"
FailureIsFatal="true" Name="EmailSender" Targets="localserver"/>
<StartupClass Arguments="" ClassName="com.lasso.util.StartupLoad"
FailureIsFatal="true" Name="StartupLoad1" Targets="localserver"/>
<Security Name="lassov2" PasswordPolicy="wl_default_password_policy" Realm="wl_default_realm"/>
================================================================
Here is what I got after start weblogic server 6.0:
================================================================
<Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <WebLogic Server started>
<Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <ListenThread listening
o
n port 80>
<Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <SSLListenThread listenin
g on port 443>
<Jul 9, 2001 1:50:35 PM CDT> <Error> <Performance Pack> <Unable to load performa
nce pack, using Java I/O.
java.lang.ThreadDeath
>
<Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <ListenThread.run()
fa
iled: java.lang.ThreadDeath>
<Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <The WebLogic Server
i
s no longer listening for connections. You should probably restart it.>
<Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <Server shutdown has been
requested by system>
<Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <The shutdown sequence has
been initiated.>
<Jul 9, 2001 1:50:58 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
: '0' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
: '1' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
: '2' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
: '3' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
: '4' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
: '5' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread: 'ExecuteThread
==============================================================
What can I do to start those StartUp classes successfully?
Thanks.
Alan ZhangSeems like your startup class is generating error that causing wl to
shutdown. This is because you told wls that you don't want it to start if
your startup class fails (FailureIsFatal="true" ).
Take a look at your startup calss and see why is it failing...
.raja
"Alan Zhang" <[email protected]> wrote in message
news:[email protected]...
>
Hi, I have a question regarding the startup class with WL6.0. here is theconfig.xml:
=================================================================
<StartupClass
Arguments="connectionFactory=javax.jms.QueueConnectionFactory,queue=com.lass
o.email.emailQueue"
ClassName="com.lasso.service.mail.StartupEmailSender"
FailureIsFatal="true" Name="EmailSender" Targets="localserver"/>
<StartupClass Arguments="" ClassName="com.lasso.util.StartupLoad"
FailureIsFatal="true" Name="StartupLoad1" Targets="localserver"/>
<Security Name="lassov2" PasswordPolicy="wl_default_password_policy"Realm="wl_default_realm"/>
================================================================
Here is what I got after start weblogic server 6.0:
================================================================
<Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <WebLogic Serverstarted>
>
<Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <ListenThreadlistening
o
n port 80>
<Jul 9, 2001 1:50:35 PM CDT> <Notice> <WebLogicServer> <SSLListenThreadlistenin
g on port 443>
<Jul 9, 2001 1:50:35 PM CDT> <Error> <Performance Pack> <Unable to loadperforma
nce pack, using Java I/O.
java.lang.ThreadDeath
>
<Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer><ListenThread.run()
fa
iled: java.lang.ThreadDeath>
<Jul 9, 2001 1:50:36 PM CDT> <Emergency> <WebLogicServer> <The WebLogicServer
i
s no longer listening for connections. You should probably restart it.>
<Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <Server shutdown hasbeen
requested by system>
<Jul 9, 2001 1:50:36 PM CDT> <Alert> <WebLogicServer> <The shutdownsequence has
been initiated.>
<Jul 9, 2001 1:50:58 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
: '0' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
: '1' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
: '2' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
: '3' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
: '4' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
: '5' for queue: 'default'' stopped.>
<Jul 9, 2001 1:51:06 PM CDT> <Critical> <Kernel> <Execute Thread:'ExecuteThread
==============================================================
What can I do to start those StartUp classes successfully?
Thanks.
Alan Zhang -
In weblogic 5.0, I can specify the arguments for my startup classes. I tried
to specify the arguments in WebLogic 6.0 through the console. However, the
arguments field has a length limitation which I can not type in all of the
arguments I would like to pass.
Any suggestions?
Thx,
ZhiyongIf you put it manually in the config.xml file for the domain in question -
and don't edit the startup parms through the console - does the console
corrupt it by only saving what the console's edit saves?
"Zhiyong Li" <[email protected]> wrote in message
news:3a5ce2a9$[email protected]..
In weblogic 5.0, I can specify the arguments for my startup classes. Itried
to specify the arguments in WebLogic 6.0 through the console. However, the
arguments field has a length limitation which I can not type in all of the
arguments I would like to pass.
Any suggestions?
Thx,
Zhiyong -
Startup class is not working in oc4j
hi
I have a servlet .In init of that servlet I will create an instance of a startup class .
In web.xml configuration I gave <load-on-startup></load-on-startup> .I created a war and an ear and deployed my application .The startup class is not called.
But when I configured the servlet in the default-web-app the startup class is running.
And furthur when I hot deploy my ear the startup class is running.
But when I restart my application server the startup class is not invoked.
can anybody help
Regards
Gajendran.Ghi
I had put auto-start=true in server.xml .then also it is not working.
when I redeploy my ear,the startup class is invoked,but when i restart the
server it does'nt
gaj -
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,
DharaniI 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 -
Problems in startup class (MDB on Weblogic 7.0 / IBM MQ)
Hello friends,
I am trying to communicate with IBM MQ through Weblogic 7.0 SP2 and
using MDB.
This is a bit strange but I had to reinstall Weblogic and I tried to
deploy the Startup class . However I am getting this error:
The WebLogic Server did not start up properly.
Exception raised:
java.lang.NoSuchMethodError
at com.ibm.mq.jms.services.ConfigEnvironment.<clinit>(ConfigEnvironment.java:173)
at java.lang.Class.forName0(Native Method)
I am totally at loss to understand this as it was working before I
reinstalled the Weblogic. (Maybe I am skipping something which I had
earlier done :-().
All help appreciated.
Thanks in advance,
Milan Doshi
Since your simply running an MQ client in a startup class, you should
be able to reproduce the issue without WebLogic in the mix. Once
that is done, contact IBM for support. I continue to suspect
a command-line problem - IBM is expecting something on
the java JVM command-line that is missing.
Tom
Milan Doshi wrote:
> Hello Tom,
>
> Thanks for the reply. I did ensure that all the relevant IBM jars are
> in the classpath but I still get that error.Infact the claspath was
> allready in place.
>
> Please give me your suggestions as I am totally at sea.
>
>
> <May 23, 2003 5:31:17 PM EDT> <Emergency> <WebLogicServer> <000342>
> <Unable to initialize the server: Fatal initialization excepti
> on
> Throwable: java.lang.NoSuchMethodError
> java.lang.NoSuchMethodError
> at com.ibm.mq.jms.services.ConfigEnvironment.<clinit>(ConfigEnvironment.java:173)
> at java.lang.Class.forName0(Native Method)
> at java.lang.Class.forName(Class.java:115)
> at com.ibm.mq.jms.MQConnection.<clinit>(MQConnection.java:149)
> at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:142)
> at com.jpmc.ivr.middle.util.MQJMSStartup.startup(MQJMSStartup.java:112)
> at weblogic.t3.srvr.StartupClassService.invokeStartup(StartupClassService.java:158)
> at weblogic.t3.srvr.StartupClassService.invokeClass(StartupClassService.java:139)
> at weblogic.t3.srvr.StartupClassService.access$0(StartupClassService.java:130)
> at weblogic.t3.srvr.StartupClassService$1.run(StartupClassService.java:102)
> at weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManager.java:780)
> at weblogic.t3.srvr.StartupClassService.invokeStartupClass(StartupClassService.java:97)
> at weblogic.t3.srvr.StartupClassService.initialize(StartupClassService.java:60)
> at weblogic.t3.srvr.ServerLifeCycleList.initialize(ServerLifeCycleList.java:54)
> at weblogic.t3.srvr.T3Srvr.initialize1(T3Srvr.java:782)
> at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:594)
> at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:282)
> at weblogic.Server.main(Server.java:32)
>
> ***************************************************************************
> The WebLogic Server did not start up properly.
>
> Thanks and regards,
>
> Milan Doshi
>
> Tom Barnes <[email protected]> wrote in message news:<[email protected]>...
>
>>Make sure that your MQ client classes are in
>>the classpath used to boot the WL JVM. If you
>>re-installed WL, and are using the installation's
>>WL boot scripts rather than your own, the JVM
>>will have a vanilla classpath - which, of course,
>>won't include IBM classes.
>>
>>Tom
>>
>>Milan Doshi wrote:
>>
>>>Hello friends,
>>>
>>>I am trying to communicate with IBM MQ through Weblogic 7.0 SP2 and
>>>using MDB.
>>>
>>>This is a bit strange but I had to reinstall Weblogic and I tried to
>>>deploy the Startup class . However I am getting this error:
>>>
>>>
>>>The WebLogic Server did not start up properly.
>>>Exception raised:
>>>java.lang.NoSuchMethodError
>>> at com.ibm.mq.jms.services.ConfigEnvironment.<clinit>(ConfigEnvironment.java:173)
>>> at java.lang.Class.forName0(Native Method)
>>>
>>>I am totally at loss to understand this as it was working before I
>>>reinstalled the Weblogic. (Maybe I am skipping something which I had
>>>earlier done :-().
>>>
>>>All help appreciated.
>>>
>>>Thanks in advance,
>>>
>>>Milan Doshi
>>
-
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 -
WLS 10.0 Mp1 - Weblogic startup class to initialize client's SSL channels
Hi,
Is it possible to use Weblogic startup class to initialize client's SSL channels?
Any pointers are appreciated.
Thanks in advance.Hey
If possible can you explain the issue in detail.
What do you mean by “initialize client's SSL channels”
Regards,
Hussain -
Redundancy for startup class.
Hi,
I have a startup class in weblogic server. This class acts as a daemon inside
weblogic server. What happens if this class goes down due to an exception after
a while ? does the weblogic server brings it up again or can we configure it or
is it just lost?
-Kishan-It it runs in its own thread why don't you just do something like this:
public void run()
............ //initialization
while(!shouldStop)
try
catch(Throwable th)
th.printStackTrace();
and you wouldn't need anything like the functionality you are describing which I do
not believe BEA does.
Regards,
--dejan
Kishan wrote:
Hi,
I have a startup class in weblogic server. This class acts as a daemon inside
weblogic server. What happens if this class goes down due to an exception after
a while ? does the weblogic server brings it up again or can we configure it or
is it just lost?
-Kishan-[dejan_bektchiev.vcf] -
A startup class to enable MQ Queues to trigger MDBs in WLS 6.1(sp4)
Hi,
I am hoping for references to documentation or opinions on the following method
allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
with MQs connection factory.
I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
in a startup class will not allow MDBs to be linked to an MQ queue because startup
classes are run after MDB deployment during startup. However I found some unused
in-house code which appeared to do just that and it works.
Here is the code in abbreviated form:
public String startup(String str, Hashtable args) throws Exception
bindMQFactory();
bindMQQueues();
return "";
private void bindMQFactory() throws Exception
// Create MQ Factory and configure it
MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
factory.setChannel(channel );
factory.setHostName(host);
factory.setPort(Integer.parseInt(port));
factory.setQueueManager(qmanager);
factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
// bind connection factory into WLS JNDI for later use by clients
_wlsContext.bind( connectionFactoryJndi, factory );
// Force mq connection factory to be the one used for mdb's
_wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
private void bindMQQueue() throws Exception
// create queue and configure it
MQQueue queue = new MQQueue();
queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
queue.setBaseQueueName( mqQueueName );
// bind queue in WLS JNDI
_wlsContext.bind( wlsJndi, queue );
Thanks in advance for any comments or opinions on the above.
regards
Martin
Start with the white-paper:
"Using Foreign JMS Providers with WebLogic Server"
Note that to get transactional behavior you
will need to use the WebLogic Messaging Bridge feature.
Note that integrating MQ is easier in 8.1 - consider
using WL 8.1 if you can.
One more comment in-line.
Martin wrote:
> Hi,
>
> I am hoping for references to documentation or opinions on the following method
> allowing the use of MQ queues to drive MDBs in WLS. The technique involves rebinding
> the connection factory in jndi at "weblogic.jms.MessageDrivenBeanConnectionFactory"
> with MQs connection factory.
Not recommended. Highly not recommended. Do not use the same name
as the internal factory. Create your own name for a CF, and change the
weblogic ejb jar to reference your name. The above white-paper
states how to do this.
>
> I read in various newsgroup posts that replacing WLS' ConnectionFactory with MQ's
> in a startup class will not allow MDBs to be linked to an MQ queue because startup
> classes are run after MDB deployment during startup. However I found some unused
> in-house code which appeared to do just that and it works.
>
> Here is the code in abbreviated form:
> public String startup(String str, Hashtable args) throws Exception
> {
> bindMQFactory();
> bindMQQueues();
>
> return "";
> }
>
> private void bindMQFactory() throws Exception
> {
>
> // Create MQ Factory and configure it
> MQQueueConnectionFactory factory = new MQQueueConnectionFactory();
> factory.setChannel(channel );
> factory.setHostName(host);
> factory.setPort(Integer.parseInt(port));
> factory.setQueueManager(qmanager);
> factory.setTransportType( JMSC.MQJMS_TP_CLIENT_MQ_TCPIP );
>
> // bind connection factory into WLS JNDI for later use by clients
> _wlsContext.bind( connectionFactoryJndi, factory );
>
> // Force mq connection factory to be the one used for mdb's
> _wlsContext.rebind("weblogic.jms.MessageDrivenBeanConnectionFactory", factory);
> }
>
> private void bindMQQueue() throws Exception
> {
> // create queue and configure it
> MQQueue queue = new MQQueue();
> queue.setTargetClient(JMSC.MQJMS_CLIENT_NONJMS_MQ );
> queue.setBaseQueueName( mqQueueName );
>
> // bind queue in WLS JNDI
> _wlsContext.bind( wlsJndi, queue );
> }
>
> Thanks in advance for any comments or opinions on the above.
>
> regards
>
> Martin
-
How to define my startup class in an .ear package?
I am using WL6.0SP2 on solaris.
I plan to package my application as an .ear file and to put all necesarry class
files in there (it will has one .war file for the web tier and one .jar file for
the EJBs).
I want, when Weblogic loads my .ear file (i.e. my application), to execute my
special startup class, which initializes some caches, etc.
I do not want to define a startup/shutdown class in the console, because it is
only specific to my application and this startup class is not present in the weblogic
classpath during weblogic startup.
The correct place should be in application.xml, but I don't see such thing in
the DTD.
Thank you,
Ivaylo ZlatevThere is no way to do this on the EAR level - you can use load-on-startup
servlet(s) in your web component, or initial-beans-in-free-pool=1 EJB.
Ivaylo Zlatev <[email protected]> wrote:
I am using WL6.0SP2 on solaris.
I plan to package my application as an .ear file and to put all necesarry class
files in there (it will has one .war file for the web tier and one .jar file for
the EJBs).
I want, when Weblogic loads my .ear file (i.e. my application), to execute my
special startup class, which initializes some caches, etc.
I do not want to define a startup/shutdown class in the console, because it is
only specific to my application and this startup class is not present in the weblogic
classpath during weblogic startup.
The correct place should be in application.xml, but I don't see such thing in
the DTD.
Thank you,
Ivaylo Zlatev--
Dimitri -
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
Orlyracb 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
Maybe you are looking for
-
URGENT - HELP NEEDED WITH ECC 6.0 ACCESS KEY and USER SETUP
Please help me with the two issues: 1) In ECC 6.0, When I go to SE12 , table V-FAGL_ACTIVEC (New GL Activation) to make the table display and maintenance allowed, I am asked for the access key. What is the access key that I am supposed to put here. W
-
PO Creation for third party sales
Hi We have the scenario Third party sales and High sea sales which is already in use (already configured) , where PR getting generated automatically . But client requirement is they want the PO to generate automatically by the system the moment i sav
-
Menu option not available in SAP GUI transaction in Portal
Hi all, When accessing SAP Transaction iview via the portal 7.31 the drop down menu option is not available in the first session. It is available in the second session and when accessing SAP Traansaction directly from the SAPLOGON pad, the option all
-
Graphical corruption in X after playing media or using chromium
In SMPlayer (xv output) and sdlmame, when I switch to full screen, afterwards X will show graphical corruption. This does not seem to happen with VLC or GnomeMPlayer. For SMPlayer, the task bar space between icons and the pager, and the rest of it af
-
FCP won't boot after installation
Hi! Today I tried to install FCP5.1 on my new MacBook Pro but It won't boot! I installed it, tried to open the program, but directly after going to the dock it dissapeared and did nothing. So I tried again, but I keep getting the same problem. You ca