It's not a secret anymore!*
The moose likes BEA/Weblogic and the fly likes struts and weblogic 6.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "struts and weblogic 6.1" Watch "struts and weblogic 6.1" New topic
Author

struts and weblogic 6.1

Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
Hi
These are the weblogic details
Console Release Build6.1.2.0Server Release Build6.1.2.0Server BuildWebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529 All Server Product VersionsWebLogic Server 6.1 SP2 12/18/2001 11:13:46 #154529 WebLogic XML Module 6.1 SP2 12/18/2001 11:28:02 #154529
I have the following in my server classpath
set CLASSPATH=.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;C:\bea61\wlserver6.1\config\Struts\applications\StrutsApp\struts-blank\WEB-INF\lib\jaxp.jar;C:\bea61\wlserver6.1\config\Struts\applications\StrutsApp\struts-blank\WEB-INF\lib\jdbc2_0-stdext.jar;C:\bea61\wlserver6.1\config\Struts\applications\StrutsApp\struts-blank\WEB-INF\lib\crimson.jar

and when i try to deploy the sample application provided by struts i get the following error
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 $Proxy12.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 $Proxy8.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:2495)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2204)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
Distributed update exception
- remote object: Struts:Location=MyServer,Name=MyServer,Type=ServerConfig
- remote server: weblogic.management.internal.RemoteMBeanServerImpl@797d27
- actionName: addDeployment
- params: [Ljava.lang.Object;@59a6ac
- signature: [Ljava.lang.String;@4d6d4e
Distributed update exception
- remote object: Struts:Location=MyServer,Name=MyServer,Type=ServerConfig
- remote server: weblogic.management.internal.RemoteMBeanServerImpl@797d27
####<Jun 5, 2002 4:36:58 PM EEST> <Debug> <HTTP> <D1200034> <wlcsServer> <main> <system> <> <101158> <Exception thrown while loading struts-blank: java.lang.StringIndexOutOfBoundsException: String index out of range: -1>
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:469)
at weblogic.servlet.internal.WebAppHelper.extractClassFiles(WebAppHelper.java:234)
at weblogic.servlet.internal.WebAppServletContext.extractClassFiles(WebAppServletContext.java:3407)
at weblogic.servlet.internal.WebAppServletContext.setDocroot(WebAppServletContext.java:3376)
at weblogic.servlet.internal.WebAppServletContext.init(WebAppServletContext.java:862)
at weblogic.servlet.internal.WebAppServletContext.<init>(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 $Proxy36.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.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:984)
at weblogic.management.internal.DynamicMBeanImpl.addDeployment(DynamicMBeanImpl.java:971)
at weblogic.management.internal.DynamicMBeanImpl.add(DynamicMBeanImpl.java:956)
at weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl.java:648)
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 $Proxy24.addTarget(Unknown Source)
at weblogic.management.mbeans.custom.ApplicationManager.autoDeploy(ApplicationManager.java:867)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(ApplicationManager.java:966)
at weblogic.management.mbeans.custom.ApplicationManager.addApplication(ApplicationManager.java:886)
at weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:802)
at weblogic.management.mbeans.custom.ApplicationManager.poll(ApplicationManager.java:733)
at weblogic.management.mbeans.custom.ApplicationManager.update(ApplicationManager.java:206)
at weblogic.management.mbeans.custom.ApplicationManager.startAdminManager(ApplicationManager.java:278)
at weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManager.java:152)
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 $Proxy5.start(Unknown Source)
at weblogic.management.Admin.startApplicationManager(Admin.java:1184)
at weblogic.management.Admin.finish(Admin.java:591)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:520)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:203)
at weblogic.Server.main(Server.java:35)
[ June 06, 2002: Message edited by: Rahul Mahindrakar ]
[ June 06, 2002: Message edited by: Rahul Mahindrakar ]
Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

http://jakarta.apache.org/struts/doc-1.0.2/installation.html


Groovy
Sundar Rajan
Greenhorn

Joined: Jun 08, 2002
Posts: 12
I don't see struts.jar in the classpath. Probably the container is not able to instantiate the ActionServlet.I am able to deploy a struts application in weblogic 6.1 sp2 with out any problem
Sundar Rajan
Greenhorn

Joined: Jun 08, 2002
Posts: 12
I don't see struts.jar in the classpath.But ActionServlet is instantiated as is evident from the stack trace.Try using xerces parser instead of crimson and ensure that this is the first item in the classpath. A struts application that I use has the following classpath
C:\bea1\wlserver6.1>set CLASSPATH=.\config\mydomain\applications\xerces.jar;.\config\mydomain\applications\log4j.jar;.
\config\mydomain\applications\intranet-1.0.jar;.\config\mydomain\applications\st
ruts.jar;.\config\mydomain\applications\poolman-2.1.jar;.;.\lib\weblogic_sp.jar;.\lib\weblogic.jar

This works and my strts application does get started as is evident from the following
'http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd')
Resolving to alternate DTD 'jar:file:/C:/bea1/wlserver6.1/config/mydomain/appli
cations/struts.jar!/org/apache/struts/resources/struts-config_1_0.dtd'
New org.apache.struts.action.ActionFormBean
Set org.apache.struts.action.ActionFormBean properties
Call org.apache.struts.action.ActionServlet.addFormBean(ActionFormBean[studentFo
rm])
Pop org.apache.struts.action.ActionFormBean
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/show-
add-student])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/add-s
tudent-preview, type=com.geps.gees.cs.intranet.presentation.struts.actionbeans.A
ddStudentAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/save-
student, type=com.geps.gees.cs.intranet.presentation.struts.actionbeans.SaveStud
entAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/manag
e-students, type=com.geps.gees.cs.intranet.presentation.struts.actionbeans.Manag
eStudentAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/show-
edit-student])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/updat
e-student-preview, type=com.geps.gees.cs.intranet.presentation.struts.actionbean
s.UpdateStudentPreviewAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/updat
e-student-confirm, type=com.geps.gees.cs.intranet.presentation.struts.actionbean
s.UpdateStudentConfirmAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/delet
e-student])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
New org.apache.struts.action.ActionForward
Set org.apache.struts.action.ActionForward properties
Call org.apache.struts.action.ActionMapping.addForward(ActionForward[success])
Pop org.apache.struts.action.ActionForward
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/delet
e-confirm, type=com.geps.gees.cs.intranet.presentation.struts.actionbeans.Delete
StudentConfirmAction])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/show-
student])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/error
_gecs_400])
Pop org.apache.struts.action.ActionMapping
New org.apache.struts.action.ActionMapping
Set org.apache.struts.action.ActionMapping properties
Call org.apache.struts.action.ActionServlet.addMapping(ActionMapping[path=/error
-gecs])
Pop org.apache.struts.action.ActionMapping
register('-//Apache Software Foundation//DTD Struts Configuration 1.0//EN', 'jar
:file:/C:/bea1/wlserver6.1/config/mydomain/applications/struts.jar!/org/apache/s
truts/resources/struts-config_1_0.dtd'
Rahul Mahindrakar
Ranch Hand

Joined: Jul 28, 2000
Posts: 1850
tried putting struts.jar in the classpath but it does not work and the same problem arises. Anyhow earlier the struts.jar was there in the lib directory.
The application works fine in weblogic 7.0 so i guess i will have to work with struts in 7.0
Steve Chernyak
Ranch Hand

Joined: Oct 19, 2000
Posts: 113
I don't think its a good idea to put struts.jar in the system classpath. If you later want to deploy new web apps with the latest version of struts while still using the older version with older applications you could run into problems.
Are you able to deploy one of the sample applications?
These come with the distribution. Try deploying something like struts-documentation.war.
Sundar Rajan
Greenhorn

Joined: Jun 08, 2002
Posts: 12
I still feel the problem with th XML parser configuration. Try using xerces and make sure it appears first in the classpath.Also modify the config.xml to tell weblogic which parser to use.You can do this by adding the following text just before the </domain> tag
<XMLRegistry
DocumentBuilderFactory="org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"
Name="My XML Registry" SAXParserFactory="org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
Put the whole string in one line.
[ June 13, 2002: Message edited by: Sundar Rajan ]
Ying Zhou
Greenhorn

Joined: Feb 13, 2002
Posts: 10
Well, I have struts example works on my wlserver6.1. I just deployed it as a war file. So I suggest you create a clean enviroment and drop that war file in your application directory and see if any problems.
just my 2 cents
good luck

Ying
Sundar Rajan
Greenhorn

Joined: Jun 08, 2002
Posts: 12
I did the same thing as Ying and it works . Any way, deploying a web application as a war file is the prefered way as opposed to context mapping
Sundar
Julien Nerat
Greenhorn

Joined: Jun 19, 2002
Posts: 4
Hi
little advice (don't know if it will solve the problem) :
don't put struts.jar the /lib or /lib/ext directory of the server, remove it if it is there, and don't put it in the server classpath.
Put it only in the WEB-INF/lib of your application.
Hope this will help
Julien
shrikant patel
Greenhorn

Joined: May 02, 2005
Posts: 1
Hi

I had also facing the same problem as "Rahul Mahindrakar". I tried all the option said in forum. I tried using xerces.jar parser and also changed config.xml. But it did not work.

Rahul were u able to get solution to this prob? If yes. Let me know the solutions.

With regards,
Shrikant
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: struts and weblogic 6.1