Help using JMX to Get Context of Deployed Web Apps

I think this question is more of a JMX question that anything else (like a JNDI question), so I am posting here. If anyone feels this should be posted elsewhere, please let me know.
I want to be able to get a handle to each deployed web app's context, so that I may get a BasicDataSource from it, then look at the connection attributes inside of that BasicDataSource, i.e., Number of active connections, number of idle connections, etc. for each deployed web app.
This is the path I am heading down (if there is another way, please let me know). The code below is inside of a JSP running inside of a web app within my Tomcat 5.0.16 server, running JDK 1.4.2.
Here is the entire JSP...
<%@ page import="org.apache.commons.dbcp.BasicDataSource,
                 javax.naming.InitialContext,
                 javax.naming.Context,
                 javax.management.ObjectName,
                 javax.management.MBeanServer,
                 java.util.Set,
                 org.apache.catalina.mbeans.MBeanUtils,
                 java.util.Iterator,
                 javax.management.ObjectInstance,
                 org.apache.catalina.core.StandardContext"%>
<html>
    <head>
        <meta http-equiv="refresh" content="3"> <!-- refresh every 3 seconds -->
    </head>
    <body>
<%
    //InitialContext ctx = new InitialContext();
    //Context envCtx = (Context) ctx.lookup("java:comp/env");
    String dsName = "";//"jdbc/raptor";
    String appName = "";//(String) envCtx.lookup("appName");
    BasicDataSource ds = null;//(BasicDataSource) envCtx.lookup(dsName);
    MBeanServer mBeanServer = MBeanUtils.createServer();
    ObjectName oname = new ObjectName("*:j2eeType=WebModule,*");
    Set contexts = mBeanServer.queryMBeans(oname, null);
    Iterator it = contexts.iterator();
    while(it.hasNext()) {
        ObjectInstance oi = (ObjectInstance)it.next();
        ObjectName cname = oi.getObjectName();
        System.out.println(">>> cname = " + cname.toString()); // this prints something like this: Catalina:j2eeType=WebModule,name=//localhost/accesstracker,J2EEApplication=none,J2EEServer=none
            Is this the right way to do this??? I seem to be getting the web app, I just want to be able to
            get a handle to that web app's context, get a BasicDataSource from it, then look at the connection
            attributes inside of that BasicDataSource, i.e., Number of active connections, number of idle
            connections, etc. for each deployed web app
        //javax.naming.Context iCtx = (javax.naming.Context) mBeanServer.invoke(cname, "findStaticResources", null, null); // will this do it???
        Object obj = new InitialContext().lookup("java:comp/env"); // this only gets the current context (the web app I'm currently in)
        if(obj != null){
            Context envCtx = (Context) obj;
            appName = (String) envCtx.lookup("appName");
            ds = (BasicDataSource) envCtx.lookup("jdbc/raptor");
        }else{
            System.out.println("obj is null");
%>      <%=cname.toString()%><br/>
        Application name: <%=appName%><br/>
          Number of Active Connections = <%=ds.getNumActive()%>
        <br/>
          Number of Idle Connections = <%=ds.getNumIdle()%>
        <br/>
          Initial Size of Pool = <%=ds.getInitialSize()%>
        <br/>
          Maximum Number of Active Connections = <%=ds.getMaxActive()%>
        <br/>
<%
%>
    </body>
</html>The above JSP will output all of the info for each deployed web app, however, when it gets to getting the Context of the web app, it simply outputs information repeatedly for the web app this JSP is in (which makes sense since I'm using InitialContext).
I appreciate any help anyone could provide.
Thank you

If you want your application to work only with specific JRE version, you should use static versioning. I installed JRE 1.3.1_15 and JRE 5.0U5 , both of them works successfully. I used the below syntax to load applets:
for 1.3.1_15:
<object
    classid = "clsid:CAFEEFAC-0013-0001-0015-ABCDEFFEDCBA"
    codebase = "http://java.sun.com/products/plugin/autodl/jinstall-1_3_1_15-windows-i586.cab#Version=1,3,1,15"
    WIDTH = 150 HEIGHT = 25 >
    <PARAM NAME = CODE VALUE = "HelloWorld.class" >
    <param name = "type" value = "application/x-java-applet;jpi-version=1.3.1_15">
    <param name = "scriptable" value = "false">
    <comment>
     <embed
            type = "application/x-java-applet;jpi-version=1.3.1_15" \
            CODE = "HelloWorld.class" \
            WIDTH = 150 \
            HEIGHT = 25
         scriptable = false
         pluginspage = "http://java.sun.com/products/plugin/index.html#download">
         <noembed>
            </noembed>
     </embed>
    </comment>
</object>for 5.0U5
<object
    classid = "clsid:CAFEEFAC-0015-0000-0005-ABCDEFFEDCBA"
    codebase = "http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab#Version=1,5,0,5"
    WIDTH = 150 HEIGHT = 25 >
    <PARAM NAME = CODE VALUE = "HelloWorld.class" >
    <param name = "type" value = "application/x-java-applet;jpi-version=1.5.0_05">
    <param name = "scriptable" value = "false">
    <comment>
     <embed
            type = "application/x-java-applet;jpi-version=1.5.0_05" \
            CODE = "HelloWorld.class" \
            WIDTH = 150 \
            HEIGHT = 25
         scriptable = false
         pluginspage = "http://java.sun.com/products/plugin/index.html#download">
         <noembed>
            </noembed>
     </embed>
    </comment>
</object>- Mike

Similar Messages

  • Using JMX to get rollback statistics

    Has anyone used MBean monitoring to get WebLogic transaction rollback statistics? Is there any example code for this out there?
    thanks,
    Jake Vogelaar

    Hello Adam,
    Adam Lunger wrote:
    I have registered a notification listener with a JMSDestinationRuntimeMBean, but I don't get any notifications.
    What notifications are sent from the JMSDestinationRuntimeMBean? All kinds of JMX Notifications like AttributeChangeNotifications.
    >
    Specifically I want to receive notifications when the MesssagesCurrentCount changes. Can I use JMX to get these notifications? Any help is appreciated.Yes, you can use JMX to get notifications when this attribute changes.
    Check out
    http://e-docs.bea.com/wls/docs81/jmx/notifications.html#1118345
    Thanks,
    -satya

  • 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,
    Radu

    As 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.

  • (Re)Deploying web apps under [/] on SJSAS PE8

    I need some help on deploying web app under root []of the default virtual server.
    The problem is when specifying "Default Web Module" for the virtual servers I guess...
    How can I use asadmin or Ant task to deploy a directory under / ?
    Is it possible to use asadmin to specify virtual server's "Default Web Module" without restarting it.
    The optimal goal is to have ability to deploy/redeploy/undeploy a web app under / via ant task without restarting the domain itself....
    How can I accomplish this under SJSAS PE8?
    Any help on this topic is appreciated...

    You may want to look at the responses in this thread:
    http://forum.java.sun.com/thread.jsp?forum=136&thread=529445&tstart=0&trange=50
    This thread may also be helpful:
    http://forum.java.sun.com/thread.jsp?forum=136&thread=526094&tstart=0&trange=15
    Note:
    If the "redirect" that happens when you try to access the "docroot" of the admin instance is acceptable behavior, you may want to look at the differences between the 'server' and __asadmin Virtual Server.
    While you can do that with any text editor, I would suggest that you use the admin console app to do this.
    By deleting the docroot property and setting the default web module property you may be able to get the behavior you want.
    You will have to deploy the web app, with a context-root that is NOT / and restart the app server.
    You should be able to redeploy your web app "normally" after that, though....

  • Link to goto deployed web app

    hi all,
    i have deployed a web application(war file) in UCM using the JSP Web App Administration Page. I need the url to access it. Please help.
    Also if i want to use webdav to replace the jsps inside the web app, how do i do it? As far as i know the webdav url checks out folders and since i checked in a war file i am able to view that. how do i replace the jsp file in the deployed web app? Please suggest.
    Thanks and Regards,
    nithya

    Check this out: http://download.oracle.com/docs/cd/E17904_01/doc.1111/e10807/c06_integration.htm#i1084683

  • I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with   - how can I change this?

    I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with %20  - how can I change this?

    Click on the below link :
    https://get.adobe.com/flashplayer/otherversions/
    Step 1: select Mac OS  X 10.6-`0.`0
    Step 2 : Safari and FIrefox
    Then click on " Download Now"  button.

  • Unable to deploy Web App using JPA TopLink Essentials in Tomcat5.5.17

    Hi All,
    I am trying to deploy a Web App ( used Top Link Essentials ) to Tomcat and i am getting the following Error..
    I am strating tomcat using -javaagent:/Path/To/spring-agaent.jar
    Dec 14, 2006 9:52:46 AM org.apache.catalina.loader.WebappClassLoader loadClass
    INFO: Illegal access: this web application instance has been stopped already.  Could not load oracle.toplink.essentials.internal.weaving.ClassDetails.  The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
    java.lang.IllegalStateException
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1238)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at oracle.toplink.essentials.internal.weaving.TopLinkWeaver.transform(TopLinkWeaver.java:84)
            at org.springframework.orm.jpa.persistenceunit.ClassFileTransformerAdapter.transform(ClassFileTransformerAdapter.java:56)
            at sun.instrument.TransformerManager.transform(TransformerManager.java:122)
            at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:155)
            at java.lang.ClassLoader.defineClass1(Native Method)
            at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
            at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
            at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
            at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
            at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
            at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
            at java.lang.Class.getDeclaredConstructors0(Native Method)
            at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
            at java.lang.Class.getConstructor0(Class.java:2671)
            at java.lang.Class.newInstance0(Class.java:321)
            at java.lang.Class.newInstance(Class.java:303)
            at org.apache.myfaces.application.ApplicationImpl.createComponent(ApplicationImpl.java:396)
            at com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:1438)
            at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:509)
            at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3729)
            at org.apache.catalina.core.StandardContext.start(StandardContext.java:4187)
            at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
            at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
            at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
            at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
            at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:535)
            at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
            at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1122)
            at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:310)
            at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1021)
            at org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
            at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1013)
            at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
            at org.apache.catalina.core.StandardService.start(StandardService.java:450)
            at org.apache.catalina.core.StandardServer.start(StandardServer.java:709)
            at org.apache.catalina.startup.Catalina.start(Catalina.java:551)
            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:585)
            at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
            at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432) Thanks
    Sateesh

    Spring 2.0 provides custom support for TopLink Essentials in Tomcat out-of-the-box. You should follow the instructions here: http://static.springframework.org/spring/docs/2.0.x/reference/orm.html#orm-jpa-setup-lcemfb-tomcat
    Essentially, Spring provides a custom class loader for Tomcat and doesn't use an agent.
    --Shaun                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Using Forte 3.0 to deploy web app to iPlanet Web Server

    Is anyone familiar with using Forte 3.0 to develop/deploy a web application to an iPlanet Server?
    All I need is a simple walkthrough to create/deploy a "Hello World" app (it could be just a JSP) or a link to some document that covers this topic.
    Thanks

    For anyone who cares
    First make a web module, then make a web application and add the web module you made. When adding it the Mapping field should contain whatever context of the module is. Then deploy the application.

  • When I try to use firefox, I get the this message: error: App:Name not specified in application.ini

    I cannot access firefox 0n my other computer. I just get this error message: error:App:Name not specified in application.ini

    This is most likely caused by Zone Alarm software. Please check http://support.mozilla.com/en-US/questions/880170

  • Unable to deploy Web App in Exploded format

    Using WLS 6.1 sp2, I am unable to deploy a web application successfully using the
    web app "ora" from http://www.thejspbook.com/examples.jspbook.zip. I've moved
    the /ora directory under the /WEB-INF/applications directory.
    The error I am getting is:
    java.lang.reflect.InvocationTargetException: weblogic.management.DistributedManagementException:
    Distributed Management [1 exceptions]
         at weblogic.management.internal.ConfigurationMBeanImpl.updateConfigMBeans(ConfigurationMBeanImpl.java:543)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         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:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy9.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1516)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:895)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:295)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy18.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         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:2503)
         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)
    Distributed update exception
    - remote object: efs-developer3:Location=efsserver,Name=efsserver,Type=ServerConfig
    - remote server: weblogic.management.internal.RemoteMBeanServerImpl@5420eb
    - actionName: addDeployment
    - params: [Ljava.lang.Object;@10c03e
    - signature: [Ljava.lang.String;@3d4a20
    Distributed update exception
    - remote object: efs-developer3:Location=efsserver,Name=efsserver,Type=ServerConfig
    - remote server: weblogic.management.internal.RemoteMBeanServerImpl@5420eb
    java.lang.StringIndexOutOfBoundsException: String index out of range: -1
         at java.lang.String.substring(String.java:1525)
         at weblogic.servlet.internal.WebAppHelper.resolveManifestName(WebAppHelper.java:476)
         at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:232)
         at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3415)
         at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3384)
         at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
         at weblogic.servlet.internal.WebAppServletContext.(WebAppServletContext.java:815)
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:428)
         at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
         at weblogic.j2ee.Application.addComponent(Application.java:163)
         at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
         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:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         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:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy34.addWebDeployment(Unknown Source)
         at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
         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:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         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:491)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         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:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy9.addDeployment(Unknown Source)
         at weblogic.management.internal.DynamicMBeanImpl.updateDeployments(DynamicMBeanImpl.java:1516)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:895)
         at weblogic.management.internal.DynamicMBeanImpl.setAttribute(DynamicMBeanImpl.java:847)
         at weblogic.management.internal.ConfigurationMBeanImpl.setAttribute(ConfigurationMBeanImpl.java:295)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1356)
         at com.sun.management.jmx.MBeanServerImpl.setAttribute(MBeanServerImpl.java:1331)
         at weblogic.management.internal.MBeanProxy.setAttribute(MBeanProxy.java:322)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:204)
         at $Proxy18.setTargets(Unknown Source)
         at java.lang.reflect.Method.invoke(Native Method)
         at weblogic.management.console.info.FilteredMBeanAttribute.doSet(FilteredMBeanAttribute.java:92)
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:135)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         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:2503)
         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)
    --------------- nested within: ------------------
    weblogic.j2ee.DeploymentException: Could not load ora - with nested exception:
    [java.lang.StringIndexOutOfBoundsException: String index out of range: -1]
         at weblogic.servlet.internal.HttpServer.loadWebApp(HttpServer.java:431)
         at weblogic.j2ee.WebAppComponent.deploy(WebAppComponent.java:74)
         at weblogic.j2ee.Application.addComponent(Application.java:163)
         at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
         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:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         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:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy34.addWebDeployment(Unknown Source)
         at weblogic.management.configuration.WebServerMBean_CachingStub.addWebDeployment(WebServerMBean_CachingStub.java:1121)
         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:636)
         at weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:621)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:359)
         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:491)
         at weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBeanImpl.java:361)
         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:468)
         at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
         at $Proxy9.--------------- nested within: ------------------
    weblogic.management.console.utils.SetException: An error occurred while updating
    Targets-Server on Proxy for efs-developer3:Application=ora,Name=ora,Type=WebAppComponent
    - with nested exception:
    [java.lang.reflect.InvocationTargetException - with target exception:
    [weblogic.management.DistributedManagementException: Distributed Management [1
    exceptions]]]
         at weblogic.management.console.actions.mbean.DoEditMBeanAction.perform(DoEditMBeanAction.java:151)
         at weblogic.management.console.actions.internal.ActionServlet.doAction(ActionServlet.java:171)
         at weblogic.management.console.actions.internal.ActionServlet.doPost(ActionServlet.java:85)
         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:2503)
         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)
    Any help is appreciated.
    Thanks,
    Dennis

    you are probably using a older version of 6.1. please use the latest service pack. Service Packs are mostly bug fix releases and they are safe to be upgraded even on production systems. Please note - we always recommend using the latest service pack
    http://www.sun.com/download/products.xml?id=47d5d3eb

  • How to deploy web app from PC to Linux with Netbeans ?

    I am developing a web app in Netbeans 6.0 on my PC, using the Tomcat comes with the IDE, now I need to deploy it to a Linux server running Tomcat, can I do it from inside the IDE ? Can it copy all the servlets and other java classes to the Linux for me ? If so, what info does it need from me ? Login, password ... ?
    If not, how can I do it by hand ?
    Frank

    RTFM
    You need to consult the NetBeans Help to see if it will export a WAR/EAR. Regarding getting it over to Linux, there are some issues there. But if you have visibility to the Linux deploy directory from your PC then it's possible. It's certainly possible to do ALL of this using Apache Ant.

  • Issue while accessing deployed web-app on Weblogic 10.3.5

    We have deployed a web app on Weblogic server 10.3.5 as a WAR file. The deployment looks fine and application is in "Active" state. However when we try to access the application it fails to detect the Struts tags and gives following error -
    weblogic.servlet.jsp.CompilationException: Failed to compile JSP /view/login/login.jsp
    login.jsp:4:1: Type mismatch: cannot convert from Tag to JspTag
    *<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtm*
    *l1-transitional.dtd">*
    *^---------------------------------------------------------------------------------------------------*
    *<title><s:property value="customerLoginContentVO.pageTitle" /> Dashboard</title>*
    ------^
    I looks like it doesn't get the Struts libraries. We have included the Struts libraries in WEB-INF/lib of the web app and set prefer-web-inf-classes to true in weblogic.xml. Why is it that it is able to find the jars to deploy but not to access the application.
    One alternate method suggested is to have package the war into a  ear and provide the mapping for struts libraries as prefer-application-packages in weblogic-application.xml. But we think creating a ear just for library load in not a right approach & we are definitely missing something.
    Any help on this issue will be appreciated.
    Thanks,
    Jiten S

    WLS 10.3.5 (and some versions before that too, one of the 10.3.x releases changed this) should also support prefer-application-packages. It doesn't appear as though the documentation has been updated to reflect that.
    Needs updating:
    http://download.oracle.com/docs/cd/E21764_01/web.1111/e13712/weblogic_xml.htm#i1075205
    http://download.oracle.com/docs/cd/E12840_01/wls/docs103/programming/classloading.html#wp1098468
    I'll file a documentation bug.
    In the meantime, you can see that it is there in the XSD:
    http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd
    which is linked to from here:
    http://download.oracle.com/docs/cd/E21764_01/web.1111/e13706/overview.htm#g1088563
    Here is an example of what a weblogic.xml might look like.
    <?xml version="1.0" encoding="UTF-8"?>
    <wls:weblogic-web-app xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.2/weblogic-web-app.xsd">
        <wls:weblogic-version>10.3.5</wls:weblogic-version>
        <wls:context-root>FilterWeb</wls:context-root>
        <wls:container-descriptor>
            <wls:prefer-application-packages>
                <wls:package-name>my.foo.package</wls:package-name>
            </wls:prefer-application-packages>
        </wls:container-descriptor>
    </wls:weblogic-web-app>

  • Weblogic 8.1 error  on deploying web app - Cannot find taglib declaration

    I am using netbeans 6.5.1. The java EE Version is configured to J2EE 1.3 and JDK version is 1.4.2 for the project.
    The application server is WebLogic 8.1.
    On deploying get the error "ServletContext(id=18276115,name=WebApplication3,context-path=/)]: Deployment descriptor "jar:file:<file path>/.wlnotdelete/extract/EdcSrv1_WebApplication3_WebApplication3/jarfiles/WEB-INF/lib/standard.jar!/META-INF/c.tld" is malformed. Check against the DTD: cvc-elt.1: Cannot find the declaration of element 'taglib'. (line 6, column 19)"
    The same error is repeated for x.tld, fn.tld, fmt.tld, scriptfree.tld, sql.ltd
    Checked web.xml file and does not have any taglib tags.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param> ....will post the entire file if required.
    do i need to manually add the taglib tags?
    Any suggestions?
    Thanks.

    I am using netbeans 6.5.1. The java EE Version is configured to J2EE 1.3 and JDK version is 1.4.2 for the project.
    The application server is WebLogic 8.1.
    On deploying get the error "ServletContext(id=18276115,name=WebApplication3,context-path=/)]: Deployment descriptor "jar:file:<file path>/.wlnotdelete/extract/EdcSrv1_WebApplication3_WebApplication3/jarfiles/WEB-INF/lib/standard.jar!/META-INF/c.tld" is malformed. Check against the DTD: cvc-elt.1: Cannot find the declaration of element 'taglib'. (line 6, column 19)"
    The same error is repeated for x.tld, fn.tld, fmt.tld, scriptfree.tld, sql.ltd
    Checked web.xml file and does not have any taglib tags.
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
        <context-param>
            <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
            <param-value>client</param-value>
        </context-param> ....will post the entire file if required.
    do i need to manually add the taglib tags?
    Any suggestions?
    Thanks.

  • ReportViewer doesn't show in deployed web app

    I have created a pretty basic web application in Visual Studio 2010.  It uses Access databases with Crystal 13.  I created a report based directly from the mdb files (no datasets) which are located in my app_data folder (the same location my report resides).   Everything is working perfectly on the development machine, when I publish it to the web server, the Crystal Report Viewer doesn't show.   No errors, no messages, just a blank white page.    I'm not sure why this is happening, but I did discover that the source code for the page with the Crystal Report Viewer shows full paths to the databases on my C: drive.  Is that where my problem is?
    If that's the issue, how do I make my database paths relative?  I can go to "Set Data Source locations" in the report, but no matter what I do (I tried creating new connections using Access/Excel DAO as well as OLE DB ADO), it always shows a full path.
    I have pulled my hair out on this one for a while now.  Please help!
    John

    Make sure you are on SP 1 for CRVS2010:
    SAP Crystal Reports, developer version for Microsoft Visual Studio: Updates & Runtime Downloads [original link is broken]
    Make sure you use SP1 runtime:
    MSI 32 bit
    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_32bit_13_0_1.zip
    MSI 64 bit
    http://downloads.businessobjects.com/akdlm/cr4vs2010/CRforVS_redist_install_64bit_13_0_1.zip
    Read the following articles re. how to configure the viewer (don't let the titles throw you. also, the articles do not go as far as CRVS2010, but the patter will be obvious):
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/a0437ea8-97d2-2b10-2795-c202a76a5e80
    http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/50aa68c0-82dd-2b10-42bf-e5502b45cd3a
    Finally, you do not mention if this is a 32 build app or a 64 bit app, 32 or 64 bit OS. IN the .NET IDE you are all 32 bit. Deploying a web app to a 32 bit OS means you have to run the app under a 32bit app pool.
    Use an HTTP sniffing utility like [Charles|http://xk72.com/] or [Fiddler|http://www.fiddlertool.com/fiddler/] to determine the viewer HTTP requests.
    - Ludek

  • Init always runs twice in startup of deployed web app

    i have a problem where I load a servlet upon startup using the <load-on-startup>1</load-on-startup> in the web.xml .. it always runs the init method twice.. this is problematic for me. when i deploy my app as a WAR, it always does this.. but if i don't deploy and just run it off docroot, it only runs it once.... what is going on here?

    Did you ever get this resolved? I am having the same problem and cannot find the answer.

Maybe you are looking for