Deploying a WebApp using JMX
IHAC who has the following problem while deploying a webapp in 6.1. I am including
her description of the problem.
Thanks in advance.
i'm still playing around with deploying to the 6.1 beta wl server using the api
calls. Although the
following code executes, it makes the server crash when attempting to add the
target MBean to the WebAppComponent...
TargetMBean targetMBean = (TargetMBean)home.getMBean(managedSrv,
"Server", domain);
ApplicationMBean appMBean = (ApplicationMBean) home.findOrCreateAdminMBean(
appNm, "Application", domain);
appMBean.setPath(path);
WebAppComponentMBean webappBean =
(WebAppComponentMBean)home.createAdminMBean
( webAppNm,"WebAppComponent", domain, ppMBean);
webappBean.setURI(warFile);
if (targetMBean.isRegistered()){
System.out.println("target is registered. Type is: " + targetMBean.getType());
webappBean.addTarget(targetMBean);
.. when the call to webappBean.addTarget(targetMBean) is made, the server console
shows this error...
java.lang.NullPointerException
at java.io.File.<init>(File.java:180)
at weblogic.management.mbeans.custom.Application.findInputStream(Application.java:1708)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
at $Proxy9.findInputStream(Unknown Source)
at weblogic.management.mbeans.custom.Application.findInputStream(Application.java:1701)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
at $Proxy42.findInputStream(Unknown Source)
at weblogic.management.configuration.ApplicationMBean_CachingStub.findInputStream(ApplicationMBean_CachingStub.java:694)
at weblogic.j2ee.Application.retrieveEar(Application.java:425)
at weblogic.j2ee.Application.<init>(Application.java:119)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:110)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
at $Proxy40.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1066)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:443)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:321)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:944)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:931)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:916)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:591)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.RemoteMBeanServerImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:266)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:233)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
javax.management.MBeanException
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:323)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:944)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:931)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:916)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:591)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.RemoteMBeanServerImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:266)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:233)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
This code attempts to deploy a war from a remote directory.
The code in the war file is mostly the security web app sample in the wl examples
directory roled into a war archive. this war deploys and runs ok using the console
("manually").
If all the code is allowed run - crashing the server - then, after restarting
the server
(if the console was running), the deployment entries are in the config.xml and
the
'mirrored' copy of the war file shows up in the .wlnotdelete directory - from
which it runs successfully.
i'd appreciate any insight on what might be going on or whether the code is correct
useage
for deployment.
IHAC who has the following problem while deploying a webapp in 6.1. I am including
her description of the problem.
Thanks in advance.
i'm still playing around with deploying to the 6.1 beta wl server using the api
calls. Although the
following code executes, it makes the server crash when attempting to add the
target MBean to the WebAppComponent...
TargetMBean targetMBean = (TargetMBean)home.getMBean(managedSrv,
"Server", domain);
ApplicationMBean appMBean = (ApplicationMBean) home.findOrCreateAdminMBean(
appNm, "Application", domain);
appMBean.setPath(path);
WebAppComponentMBean webappBean =
(WebAppComponentMBean)home.createAdminMBean
( webAppNm,"WebAppComponent", domain, ppMBean);
webappBean.setURI(warFile);
if (targetMBean.isRegistered()){
System.out.println("target is registered. Type is: " + targetMBean.getType());
webappBean.addTarget(targetMBean);
.. when the call to webappBean.addTarget(targetMBean) is made, the server console
shows this error...
java.lang.NullPointerException
at java.io.File.<init>(File.java:180)
at weblogic.management.mbeans.custom.Application.findInputStream(Application.java:1708)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
at $Proxy9.findInputStream(Unknown Source)
at weblogic.management.mbeans.custom.Application.findInputStream(Application.java:1701)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
at $Proxy42.findInputStream(Unknown Source)
at weblogic.management.configuration.ApplicationMBean_CachingStub.findInputStream(ApplicationMBean_CachingStub.java:694)
at weblogic.j2ee.Application.retrieveEar(Application.java:425)
at weblogic.j2ee.Application.<init>(Application.java:119)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:110)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:329)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
at weblogic.management.mbeans.custom.WebServer.addWebDeployment(WebServer.java:76)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:437)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:178)
at $Proxy40.addWebDeployment(Unknown Source)
at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1066)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:315)
at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:144)
at java.lang.reflect.Method.invoke(Native Method)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:587)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:443)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:321)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:944)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:931)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:916)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:591)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.RemoteMBeanServerImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:266)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:233)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
javax.management.MBeanException
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:323)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:944)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:931)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:916)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:591)
at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:573)
at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:319)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
at weblogic.management.internal.RemoteMBeanServerImpl_WLSkel.invoke(Unknown
Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:266)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:233)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:22)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
This code attempts to deploy a war from a remote directory.
The code in the war file is mostly the security web app sample in the wl examples
directory roled into a war archive. this war deploys and runs ok using the console
("manually").
If all the code is allowed run - crashing the server - then, after restarting
the server
(if the console was running), the deployment entries are in the config.xml and
the
'mirrored' copy of the war file shows up in the .wlnotdelete directory - from
which it runs successfully.
i'd appreciate any insight on what might be going on or whether the code is correct
useage
for deployment.
Similar Messages
-
Moving deployed webapp using links
hi,
we are using WLS6.1_SP2. We try to move files of an existing deployed webapp to another place (e.g. from WL_HOME/config/server/applications/example to /opt/app/example) and replace the deployed application directory using a symbolic link (e.g. ln -s /opt/app/example WL_HOME/config/server/applications/example). Unfortunally we get the following Error when we restart the managed server:
Starting WebLogic Server ....
Connecting to http://xyz:10080...
<Dec 18, 2003 4:03:08 PM CET> <Notice> <WebLogicServer> <Starting WebLogic Managed Server "aaa" for domain "aaa">
java.io.FileNotFoundException: Response: '500: Internal Server Error' for url: 'http://xyz:10080/wl_management_internal2/wl_management'
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:367)
at weblogic.j2ee.Component.getInputStream(Component.java:353)
at weblogic.j2ee.Component.retrieveComponent(Component.java:249)
at weblogic.j2ee.Component.<init>(Component.java:158)
the magic thing is, that we have this problems only on some of the servers. On some installations the link is working fine.
thanks for any help,
ThorstenThorsten Meyer <[email protected]> wrote:
hi,
we are using WLS6.1_SP2. We try to move files of an existing deployed
webapp to another place (e.g. from WL_HOME/config/server/applications/example
to /opt/app/example) and replace the deployed application directory
using a symbolic link (e.g. ln -s /opt/app/example WL_HOME/config/server/applications/example).
Unfortunally we get the following Error when we restart the managed
server:
Starting WebLogic Server ....
Connecting to http://xyz:10080...
<Dec 18, 2003 4:03:08 PM CET> <Notice> <WebLogicServer> <Starting WebLogic
Managed Server "aaa" for domain "aaa">
java.io.FileNotFoundException: Response: '500: Internal Server Error'
for url: 'http://xyz:10080/wl_management_internal2/wl_management'
at weblogic.net.http.HttpURLConnection.getInputStream(HttpURLConnection.java:367)
at weblogic.j2ee.Component.getInputStream(Component.java:353)
at weblogic.j2ee.Component.retrieveComponent(Component.java:249)
at weblogic.j2ee.Component.<init>(Component.java:158)
the magic thing is, that we have this problems only on some of the servers.
On some installations the link is working fine.
thanks for any help,
ThorstenOur workaround for the problem, is to use the link in the other direction:
Instead of
ln -s /opt/app/example WL_HOME/config/server/applications/example
we use
ln -s WL_HOME/config/server/applications/example /opt/app/example
If anybody knows why the link can not be used the other way, please let me know.
Thorsten -
Deployment of .war file using JMX in jboss 4.0.5 GA
Hi,
Can anyone help me out in the steps of deployment of .war file using JMX in JBOSS 4.0.5 server.I went through the documentation in jboss.org but couldn't find a suitable one though there were many.Any links/url that you know about the deployment process will also be helpful to me.
ThanksYou're probably using an older version of JavaMail where there was a bug in the example
DummySSLSocketFactory. Download the latest version and the example is correct.
Also, if you're using DummySSLSocketFactory just to control which servers you trust,
JavaMail 1.4.3 has some properties that will make this easier for you and avoid the need
for DummySSLSocketFactory. In particular, see the mail.imaps.ssl.trust property. -
Best practice to monitor 10gR3 OSB performance using JMX API?
Hi guys,
I need some advice on the best practice to monitor 10gR3 OSB performance using JMX API.
Jus to show I have done my home work, I managed to get the JMX sample code from
http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/example.html#wp1109828
working.
The following is the list of options I am think about:
* Set up: I have a cluster of one 1 admin server with 2 managed servers, which managed server runs an instance of OSB
* What I try to achieve:
- use JMX API to collect OSB stats data periodically as in sample code above then save data as a record to a
database table
Options/ideas:
1. Simplest approach: Run the modified version of JMX sample on the Admin Server to save stats data to database
regularly. I can't see problems with this one ...
2. Use WLI to schedule the Task of collecting stats data regularly. May be overkill if option 1 above is good for production
3. Deploy a simple web app on Admin Server, say a simple servlet that displays a simple page to start/stop and configure
data collection interval for the timer
What approach would you experts recommend?
BTW, the caveats os using JMX in http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/jmx_monitoring/concepts.html#wp1095673
says
Oracle strongly discourages using this API in a concurrent manner with more than one thread or process. This is because a reset performed in
one thread or process is not visible to another threads or processes. This caveat also applies to resets performed from the Monitoring Dashboard of
the Oracle Service Bus Console, as such resets are not visible to this API.
Under what scenario would I be breaking this rule? I am a little worried about its statement
discourages using this API in a concurrent manner with more than one thread or process
Thanks in advance,
SamHi Manoj,
Thanks for getting back. I am afraid configuring aggregation interval from Dashboard doesn't solve problem as I need to collect stats data of endpoint URI or in hourly or daily basis, then output to CSV files so line graphs can be drawn for chosen applications.
Just for those who may be interested. It's not possible to use SQL to query database tables to extract OSB stats for a specified time period, say 9am - 5pm. I raised a support case already and the response I got back is 'No'.
That means using JMX API will be the way to go :)
Has anyone actually done this kind of OSB stats report and care to give some pointers?
I am thinking of using 7 or 1 days as the aggregation interval set in Dashboard of OSB admin console then collects stats data using JMX(as described in previous link) hourly using WebLogic Server JMX Timer Service as described in
http://download.oracle.com/docs/cd/E12840_01/wls/docs103/jmxinst/timer.html instead of Java's Timer class.
Not sure if this is the best practice.
Thanks,
Regards,
Sam -
Anybody please help me in deploying my webapp
Hi all,
Can anybody let me know how to deploy an webapp on myjavaserver.com. I am using Sunone Studio 8. App built on JSP+Access.
Using the Tomcat admin tool I was able to deploy it on localhost, but when I tried it on myjavaserver.com it came with an error
Failed to connect to the url www.myjavaserver.com...
I have the war file(myapp.war) and web.xml files on the server(myjavaserver.com). I think I am using wrong url's. Also I am not sure what needs to be updated in the xml file.(I believe its called deployment descriptor).
The url's I used at the Tomcat admin tool was:
www.myjavaserver.com/~xyz/myapp.war(xyz - myaccount at myjavaserver.com)
www.myjavaserver.com/~xyz/web.xml
Thanks a lot,
KitsII believe you're supposed to use the URL ftp.myjavaserver.com, instead of www, to upload your WAR file to the server.
-
Specifications of deployment and lifecycle of JMX beans in a JEE server
Hello,
one colleague of mine is developping a service that uses an MBean to mimick a singleton (the MBean is not used for instrumentation or administration, it just holds a pool of shared non-standard resources) within a Glassfish server.
I fought this idea (as I found a static utility would be both straightforward and easy to implement), but I took it, from this forum in particular, that it is a recommended way to use an MBean to serve as a shared resource holder. Point taken (I'm not concerned with clustering yet, I mean it's OK if the singleton is not cluster-wide)
The problem is, my colleague warns that he witnesses "strange deployment behavior" with regard to the MBEan: in particular, it seems that the MBean is not unregistered upon EAR undeployment, and not redeployed upon EAR re-deployment. In particular updates to the MBean code (currently packaged within the EAR) require a server restart to take effect.
From what I understand, the MBean is registered in a JVM-wide registry (the MBean server), and its classs and instances have a different lifecycle from the EAR, which has (some sort of, obviously more complex in the details) class-loader scope.
I admit I'm making that up, from various observation -> my main problem is that I can't find an appserver-agnostic specification of the MBean lifecycle in a JEE environement. The EJB3 specification do not mention JMX (but as I understand it EJB3 alters none of the way JMX works).
There seems however to be a J2EE-specific way of handling MBean - presumably because the hot-deployment-without-JVM-restart expands the MBean lifecycle beyond the EAR lifecycle.
Could you point me to authoritative references on JMX used in JEE servers. In particular specification of the lifecycle and deployment is extremely welcome.
I'm sorry for asking pointers: my own web searches turn up non-specifying docs.
And if I search on JMX and Glassfish together, I find articles on either:
- how Glassfish uses JMX to implement a lot of stuff, but not how Glassfish implements "JMX lifecycle" (if that expression even means something).
- how to extend Glassfish's adminsitration capabilites writing custom MBeans
Thanks in advance,
J.The location of the registration code is thus the key to all this. e.g If you register manually in some startup class, you can unload/load the required versions of the MBean code.That's what we do (using a RegistryServlet and init()/destroy() callbacks).
Sketchy description from what I understand of the developer's code: the init() indeed looks up the MBean and unregisters it if it exists, then registers it anew. Sometimes, the unregistering will fail (I haven't witnessed that), which triggered this topic.
We have to investigate it further (with more rigorous archiving and analysis of the error logs). I'll post updates if any.
If the MBeans are configured to be registered by the server itself (common) then the server would need to be restarted for the changes to be picked.OK. I have no idea how to configure where the MBeans are registered, time now to confess I have used JMX only in trivial cases so far.
It is my sincere hope that you won't need to use the techniques of chapter 8 of [this specification|http://java.sun.com/javase/6/docs/technotes/guides/jmx/JMX_1_4_specification.pdf] .
Indeed!
Probably my lack of JMX knowledge, but I have no idea what the "Mlet service" is in my scenario, and I suspect I won't want to know :o)
Overall this suggests that using JMX introduces unforeseen complexities, that may be overkill in our scenario (but I'm biased as I defended a couple of other alternatives).
Thanks for your help so far; I'm still looking for some document that would clarify how the JEE server, or how Glassfish specifically, handles MBean lifecycle. -
Read the version of deployed EAR modules via JMX (WLS 10.0)
Hello
We are deploying some EAR components into a WLS 10.0. Now we want to monitor the version number of the deployed EARs via a JMX client. The version number is provided in the manifest of the EAR (Implementation-Version).
I read through some JMX related documents by BEA and searched the web, but I could not find any information on how to read the version.
Does anybody know how to do that or where to look in order to get the version numbers of the deployed components via JMX? Do I have to write my own MBean offering this version attribute?
Every hint is welcomed!
Thanks
Toni
Edited by: user10451156 on Oct 21, 2008 10:53 AMHi, Toni.
The input must be a externally provided version number, if you have no access to write manifest entries, or to the deployment process.
If this version number is already set in the ear file, you can use this process inside your custom mbean (an elaboration of Benoit's suggestion)
1 look up the application component from JMX
* http://edocs.bea.com/wls/docs100/wlsmbeanref/mbeans/AppDeploymentMBean.html
2 obtain the path of the ear file
3 open a JarURLConnection to this ear
* http://java.sun.com/javase/6/docs/api/java/net/JarURLConnection.html
4 read the implementation version, which was already provided.
* http://java.sun.com/javase/6/docs/api/java/util/jar/Attributes.Name.html#IMPLEMENTATION_VERSION
Sadly, this won't pop-up on the WLS console, you'd have to write or use a custom extension to do that.
* https://wls-console-extensions.projects.dev2dev.bea.com/
I hope this helps.
-Adrian -
Starting/stoping java app using JMX ?
Hello, do any one know, whether we can start / stop java application using JMX ? I know it is monitoring api and can help to find whether app is up or down
I see the same error when I start domain1. However, I was able to deploy and configure Access Manager 7.1 using the WAR file method, as described in Sun Java System Access Manager 7.1 Postinstallation Guide, page 153. The Guide's instructions are for Sun Java System Application Server Enterprise Edition 8.2, but they seem to work okay with version 9.1. After deploying the WAR file, the Configurator comes up automatically the first time you browse to its URL, typically http://localhost:8080/amserver.
-
Packaging/deploying a webapp client to already deployed EJBs
I have a webapp/ejb deployed on WLS 6.1. If it matters, the EJBs are
deployed in jar files but the webapp component is deployed in exploded
directory format.
Now I want to deploy another webapp that uses the same EJBs. At this
point in development, I am attempting to deploy this in exploded
directory format as well. I have run ejbc manually against the original
jars to create the EJB deployable units containing generated WL classes.
This also created a ejb-client.jar, but it does not contain any impl
classes for the home or remoted interfaces.
I tried placing the ejb-client.jar in my WEB-INF/lib but it doesn't seem
to be able to find the interface classes. Perhaps the exception I'm
getting does not mean what I think it does. It is included below.
I also tried adding the generated impl classes to the ejb-client.jar
manually, but this didn't work either. I have read the
packaging/deploying docs but don't seem to find this issue addressed
directly. From all I know, I have done this correctly, but obviously I
am missing something somewhere.
Thanks in advance for your consideration.
<May 10, 2002 1:53:57 PM CDT> <Error> <HTTP>
<[WebAppServletContext(9605583,adminApp,/adminApp)] Servlet failed with
Exception
java.lang.ExceptionInInitializerError
at
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:42)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:30)
at java.lang.reflect.Constructor.newInstance(Constructor.java:277)
at java.lang.Class.newInstance0(Class.java:301)
at java.lang.Class.newInstance(Class.java:254)
at javax.rmi.CORBA.Util.createDelegateIfSpecified(Util.java:342)
at javax.rmi.CORBA.Util.<clinit>(Util.java:54)
at
javax.rmi.PortableRemoteObject.createDelegateIfSpecified(PortableRemoteObject.java:182)
at
javax.rmi.PortableRemoteObject.<clinit>(PortableRemoteObject.java:61)
at
net.verizon.storm.util.DataBroker.initialize(DataBroker.java:102)
at
net.verizon.storm.util.DataBroker.getInstance(DataBroker.java:158)
at
net.verizon.storm.util.OrderDispatcher.<init>(OrderDispatcher.java:70)
at
net.verizon.storm.admin.OrderService.startOD(OrderService.java:159)
at
net.verizon.storm.admin.OrderService.processRequest(OrderService.java:104)
at
net.verizon.storm.admin.OrderService.doPost(OrderService.java:266)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:265)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:2456)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Caused by: java.lang.RuntimeException: could not find or instantiate any
UtilDelegate class
at
weblogic.iiop.UtilDelegateImpl.<clinit>(UtilDelegateImpl.java:72)
... 24 moreHi.
I tried placing the ejb-client.jar in my WEB-INF/lib but it >>doesn't seem to beable to
find the interface classes. Perhaps
the exception I'm getting does not mean what I think it does. >>It is includedbelow.
It seems fine since it is the way your webapp always to use its EJB client jar.
I also tried adding the generated impl classes to the ejb-
client.jar manually, but this didn't work either.Nope, you should never do this since Impl classes are used on Server Side ( webapp
treated as client of EJB in this case ) only.
It is so hard for us to analyze the problems without a test case, I would suggest
you to create a support case via http://support.bea.com/welcome.jsp to BEA support
for detailed work.
Thanks.
Ji Zhang
Developer Relations Engineer
BEA Support -
Automatic ejb redeploy when deploying a webapp
Hi all,
I' got a problem with bea 6.1 webapp deploy/redeploy.
When, from console, I upload the war the server undeploy and redeploy an EJB,
then try to deploy the war.
The ejb is used by the webapp and in the war (in WEB-INF/classes) there are the
EJB interfaces.
Is this correct ?
The real problem is that I have to deploy on a 2 node cluster. Deploying from
console automatically target the admin server, the EJB fail the redeploy and the
webapp is not deployed on the nodes.
I tryed to undeploy the EJB before deploying the webapp and another EJB (not related
to the webapp, developed here, not from bea) id redeployed ! :|
Any idea ?
Thanks
LorenzoLorenzo,
Have you considered using an Enterprise Application (EAR) which includes both your web
app and your ejbs? This way you can undeploy and redeploy at the application level and
let the server worry about the deployment order. See:
http://edocs.bea.com/wls/docs61/programming/packaging.html#1029830
You can turn off the automatic deployment to the admin server. Please read:
http://edocs.bea.com/wls/docs61/adminguide/appman.html#1029683
I hope this helps.
Regards,
Velvet
Developer Relations Engineer
BEA Systems
"\"lorenzo bolzani\" lorenzo.bolzani-at-ethink.it" wrote:
Hi all,
I' got a problem with bea 6.1 webapp deploy/redeploy.
When, from console, I upload the war the server undeploy and redeploy an EJB,
then try to deploy the war.
The ejb is used by the webapp and in the war (in WEB-INF/classes) there are the
EJB interfaces.
Is this correct ?
The real problem is that I have to deploy on a 2 node cluster. Deploying from
console automatically target the admin server, the EJB fail the redeploy and the
webapp is not deployed on the nodes.
I tryed to undeploy the EJB before deploying the webapp and another EJB (not related
to the webapp, developed here, not from bea) id redeployed ! :|
Any idea ?
Thanks
Lorenzo -
How to read the messages in the JMS Queue using JMX
Hi,
I want to read messages in the JMS queue using JMX. I was able to read using QueueBrowser but want to modify priority of the messages using JMX.
I tried to use JMSDestinationRuntimeMBean but it does not allow us to read messages unless we pass the message Id. Is there any way that I can get all the messages in the queue.
I am using Weblogic 8.1 SP4
Can someone please help me in this regard.
Thanks,
Kiran.
Edited by KGudipati at 10/22/2007 1:22 AMHi,
As far as i know, JMS Object Messages is not supported by XI JMS adapter.
you need to have the JMS provider to transform the message to bytes messages.
(Refer to SAP note 856346) -
Using JMX to get status information about NetWeaver cluster
Hi everybody,
We are trying to use JMX to get some status information about NetWeaver cluster.
For example, using the MBean with the name u201Ccom.sap.default:name=EL1,j2eeType=SAP_J2EEClusteru201D we can obtain the list of all instances running in cluster. Here an instance is a u201CJava instanceu201D in the NetWeaver terminology.
The method u201CgetInstanceNodeIDsu201D provides us with a list of all nodes of an instance.
Concretely, calling this method for a cluster running on one machine with two java processes, we get the following list of node Ids: u201C0, 1476420, 1476450, 1476451u201D where the last two correspond to the two java processes.
What are the first two node Ids from the list?
How can the last two node Ids be identified as java processes?
How can we obtain status information about each java process (node id) ?
Thanks for all ideas,
RaduAs there seems to be a lot of interest in this subject, and since I found some form of solution, I thought I'd share it with you.
In the es-cli interface, there is a thing called browse mode. Activate it by typing browse after logging in.
Now you can easily browse your network and all of the managed objects. Use getattributes at the end of each branch to see the properties of objects. So far, I've indexed all of the kernel reader module, the health monitor module, the common config reader and the config reader for workgroup servers. If my employer allows, I will post results to http://tille.garrels.be/training/sunmc/ - check later this week.
Machtelt. -
Unknown site error while deploying web services using OC4J
Hi,
I have been testing the deploying webservices examples using demo.zip on OTN site.
I have trouble in binding the web application name to stand alone OC4J.
I am running stand alone OC4J server fine. I verified the website http://localhost:8888, which is running fine.
If I issue the command
java -jar admin.jar ormi://localhost:23791 admin password1 -bindwebapp demo_ejb_web_service HelloService_web http://localhost:8888/ sejb_webservices
I get error
oracle.oc4j.admin.internal.DeployerException: Unknown site: http://localhost:8888/
What is the http-web-site address that needs to be given for binding web app, if I am running local standalone OC4J with no default port changes?
Thanks,
MohanEric,
Thanks for the response. But, still I am not able to bind web-application to OC4J.
Here is how my server.xml has defined the web-site tag:
<web-site default="true" path="./http-web-site.xml" />
My http-web-site.xml has following web-site tag:
<web-site port="8888" display-name="OC4J 10g (10.0.2) HTTP Web Site">
<default-web-app application="default" name="defaultWebApp"/>
<web-app application="default" name="dms0" root="/dms0" access-log="false" />
<web-app application="default" name="dms0" root="/dmsoc4j" access-log="false" />
<web-app application="default" name="admin_web" root="/adminoc4j"/>
<access-log path="../log/http-web-access.log"/>
</web-site>
I used the following command to bind the example web service:
java -jar c:\XtendTools\oc4j\j2ee\home\admin.jar ormi://localhost admin password1 -bindWebApp demo_ejb_service HelloService_web default-web-site /sejb_services
I get "oracle.oc4j.admin.internal.DeployerException: Unknown site: default-web-site" error.
I tried to use following names as http-web-site, but nothing works.
"http://localhost:8888"
"dms0"
"adminoc4j"
I downloaded stand alone OC4J 10.1.2 from OTN and tried these samples.
Your help will be appreciated.
Thanks,
Mohan -
I am currently deployed and was using my iMessage to be able to talk to family back in the states and my iMessage stopped working. It will no longer select my number to use as the send/receive. How do I fix this so I can continue to talk to family?
Read here:
http://support.apple.com/kb/TS2755 -
Avoiding creation of DBlink during deployment of mappings using OMBPlus
Hi
we are facing an issue in our OWB 11g R2 (upgraded to patchset 10185523)
We are deploying the mappings using OMBPlus like so
OMBCREATE TRANSIENT DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN' ADD ACTION '$object_type_DEPLOY' SET PROPERTIES (OPERATION)VALUES ('CREATE') SET REFERENCE $object_type '$objname'
OMBDEPLOY DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
set OMBCONTINUE_ON_ERROR true
OMBDROP DEPLOYMENT_ACTION_PLAN 'DEPLOY_PLAN'
OMBCOMMIT
The $objname is any object(in this case a mapping) that we are deploying
OMBPlus generates a script on OWB level to create the associated DBlink each time it deploys a mapping and we get an error
INFORMATIONAL
multiple rows found for select into statement
DBlink_a Create Error ORA-02011: duplicate database link name
But the mapping deploys fine.
Any tips how we can avoid creation of dblinks from OMBPlus whilst deploying our mappings only?
Any help will be appreciated
Birdy
Edited by: birdy on 22-Nov-2011 05:22I dont think that you can:
"Deploying a mapping or a process flow includes these steps:
•Generate the PL/SQL, SQL*Loader, or ABAP script, if necessary.
•Register the required locations and deploy any required connectors. This ensures that the details of the physical locations and their connectors are available at runtime."
http://www.comp.dit.ie/btierney/Oracle11gDoc/owb.111/b31278/concept_deploy.htm
But error that you get is only informational so you dont have to worry about it.
Maybe you are looking for
-
Ical won't start. Getting an "ical quit unexpectedly" before it even starts
This is the error I am getting, any help is greatly appreciated. Dyld Error Message: Symbol not found: _CalDAVErrVirtualHostKey Referenced from: /Applications/iCal.app/Contents/MacOS/iCal Expected in: /System/Library/Frameworks/CalendarStore.framewor
-
ClassCastException w/ BLOB
We are currently using v 2.5.2 and have run into a problem when attempting to insert a BLOB using WebLogic (via EJB). When I run a stand-alone test case, everything works as planned. The BLOB is inserted with no problems. However, if I change the tes
-
"checking file systems failed", remount results in booting again
The other day my system totally hung (doing something with eclipse & grails). After waiting a while, I rebooted. Of course filesystems wasn't unmounted cleanly so during boot I got the message from the subject. Besides that the instruction to mount r
-
how can i give grant permission to a directory in sql developer tool, but here in sql developer, i want to create directory on server, how to do this.. any notes or links ???
-
If someone is checking the yahoo mail from my computer, their ID appears if the first letter of my ID is the same with theirs. How can I delete their history logging on my computer?