Solved

Struts2 Frustrated Newbie Question

Posted on 2010-11-11
15
3,980 Views
Last Modified: 2012-05-10
All,

I'm trying to run Weblogic 10.3.3, Eclipse Helios, and the example apps from the Struts project.  I can create a basic JSP project just fine, connect to the Weblogic server and publish without a problem.

When I try to deploy ANY kind of a !@#!@ Struts project, I get the following error:

The Struts dispatcher cannot be found.  This is usually caused by using Struts tags without the associated filter. Struts tags are only usable when the request has passed through its servlet filter, which initializes the Struts dispatcher needed for this tag. - [unknown location]

This is a bunch of crap, since I can deploy the WAR file directly on to the Weblogic server, and have it work perfectly.

I've attached the file I'm trying to upload... A really straightforward "Hello World" type of file.

The rub here is, out of the box, this stuff works on Windows 7, but not in my MAC environment.

!@#!@#ng ridiculous.

Stu
0
Comment
Question by:sbweitzman
  • 8
  • 5
  • 2
15 Comments
 
LVL 92

Expert Comment

by:objects
ID: 34116954
check your startup log, may give some clues
0
 

Author Comment

by:sbweitzman
ID: 34117058
I don't really see anything wrong here... do you>?

mac1090:swm stuartw$ ./startWebLogic.sh
.
.
JAVA Memory arguments: -Xmx2048m -XX:PermSize=256m
.
WLS Start Mode=Development
.
CLASSPATH=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/tools.jar:/Weblogic/wlserver/server/lib/weblogic_sp.jar:/Weblogic/wlserver/server/lib/weblogic.jar:/Weblogic/modules/features/weblogic.server.modules_10.3.3.0.jar:/Weblogic/wlserver/server/lib/webservices.jar:/Weblogic/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/Weblogic/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/Weblogic/wlserver/common/derby/lib/derbyclient.jar:/Weblogic/wlserver/server/lib/xqrl.jar
.
PATH=/Weblogic/wlserver/server/bin:/Weblogic/modules/org.apache.ant_1.7.1/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/jre/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
.
***************************************************
*  To start WebLogic Server, use a username and   *
*  password assigned to an admin-level user.  For *
*  server administration, use the WebLogic Server *
*  console at http://hostname:port/console        *
***************************************************
starting weblogic with Java version:
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03-307, mixed mode)
Starting WLS with line:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java    -Xmx2048m -XX:PermSize=256m -Dweblogic.Name=AdminServer -Djava.security.policy=/Weblogic/wlserver/server/lib/weblogic.policy   -da -Dplatform.home=/Weblogic/wlserver -Dwls.home=/Weblogic/wlserver/server -Dweblogic.home=/Weblogic/wlserver/server   -Dweblogic.management.discover=true  -Dwlw.iterativeDev= -Dwlw.testConsole= -Dwlw.logErrorsToConsole=  weblogic.Server
<Nov 11, 2010 4:31:30 PM PST> <Info> <WebLogicServer> <BEA-000377> <Starting WebLogic Server with Java HotSpot(TM) 64-Bit Server VM Version 17.1-b03-307 from Apple Inc.>
<Nov 11, 2010 4:31:31 PM PST> <Info> <Management> <BEA-141107> <Version: WebLogic Server 10.3.3.0  Fri Apr 9 00:05:28 PDT 2010 1321401 >
<Nov 11, 2010 4:31:33 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Nov 11, 2010 4:31:33 PM PST> <Info> <WorkManager> <BEA-002900> <Initializing self-tuning thread pool>
<Nov 11, 2010 4:31:33 PM PST> <Notice> <LoggingService> <BEA-320400> <The log file /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/AdminServer.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<Nov 11, 2010 4:31:33 PM PST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/AdminServer.log00032. Log messages will continue to be logged in /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/AdminServer.log.>
<Nov 11, 2010 4:31:33 PM PST> <Notice> <Log Management> <BEA-170019> <The server log file /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/AdminServer.log is opened. All server side log events will be written to this file.>
<Nov 11, 2010 4:31:36 PM PST> <Notice> <Security> <BEA-090082> <Security initializing using security realm myrealm.>
<Nov 11, 2010 4:31:36 PM PST> <Warning> <Store> <BEA-280101> <The persistent file store "_WLS_AdminServer" is forced to use buffered I/O and so may have significantly degraded performance. Either the OS/hardware environment does not support the chosen write policy or the native wlfileio library is missing. See store open log messages for the requested and final write policies. See the documentation on store synchronous write policy configuration for advice.>
<Nov 11, 2010 4:31:37 PM PST> <Notice> <LoggingService> <BEA-320400> <The log file /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/access.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<Nov 11, 2010 4:31:37 PM PST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/access.log00004. Log messages will continue to be logged in /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/access.log.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STANDBY>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Nov 11, 2010 4:31:38 PM PST> <Warning> <Store> <BEA-280101> <The persistent file store "WseeFileStore" is forced to use buffered I/O and so may have significantly degraded performance. Either the OS/hardware environment does not support the chosen write policy or the native wlfileio library is missing. See store open log messages for the requested and final write policies. See the documentation on store synchronous write policy configuration for advice.>
<Nov 11, 2010 4:31:38 PM PST> <Warning> <Store> <BEA-280101> <The persistent file store "WseeJaxwsFileStore" is forced to use buffered I/O and so may have significantly degraded performance. Either the OS/hardware environment does not support the chosen write policy or the native wlfileio library is missing. See store open log messages for the requested and final write policies. See the documentation on store synchronous write policy configuration for advice.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <LoggingService> <BEA-320400> <The log file /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/swm.log will be rotated. Reopen the log file if tailing has stopped. This can happen on some platforms like Windows.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <LoggingService> <BEA-320401> <The log file has been rotated to /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/swm.log00020. Log messages will continue to be logged in /Weblogic/user_projects/domains/swm/servers/AdminServer/logs/swm.log.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to ADMIN>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RESUMING>
<Nov 11, 2010 4:31:38 PM PST> <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[6]". The address fe80:0:0:0:21c:42ff:fe00:9%0 might be incorrect or another process is using port 7001: java.net.BindException: Can't assign requested address.>
<Nov 11, 2010 4:31:38 PM PST> <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[5]". The address fe80:0:0:0:21c:42ff:fe00:8%0 might be incorrect or another process is using port 7001: java.net.BindException: Can't assign requested address.>
<Nov 11, 2010 4:31:38 PM PST> <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[3]". The address fe80:0:0:0:0:0:0:1%0 might be incorrect or another process is using port 7001: java.net.BindException: Can't assign requested address.>
<Nov 11, 2010 4:31:38 PM PST> <Error> <Server> <BEA-002606> <Unable to create a server socket for listening on channel "Default[4]". The address fe80:0:0:0:225:ff:feef:dd1c%0 might be incorrect or another process is using port 7001: java.net.BindException: Can't assign requested address.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <Server> <BEA-002613> <Channel "Default[1]" is now listening on 10.211.55.2:7001 for protocols iiop, t3, ldap, snmp, http.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <Server> <BEA-002613> <Channel "Default[7]" is now listening on 0:0:0:0:0:0:0:1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <Server> <BEA-002613> <Channel "Default[2]" is now listening on 10.37.129.2:7001 for protocols iiop, t3, ldap, snmp, http.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <Server> <BEA-002613> <Channel "Default[8]" is now listening on 127.0.0.1:7001 for protocols iiop, t3, ldap, snmp, http.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <Server> <BEA-002613> <Channel "Default" is now listening on 192.168.0.191:7001 for protocols iiop, t3, ldap, snmp, http.>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <WebLogicServer> <BEA-000331> <Started WebLogic Admin Server "AdminServer" for domain "swm" running in Development Mode>
<Nov 11, 2010 4:31:38 PM PST> <Warning> <Server> <BEA-002611> <Hostname "localhost", maps to multiple IP addresses: 127.0.0.1, 0:0:0:0:0:0:0:1, fe80:0:0:0:0:0:0:1%1>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to RUNNING>
<Nov 11, 2010 4:31:38 PM PST> <Notice> <WebLogicServer> <BEA-000360> <Server started in RUNNING mode>
0
 
LVL 92

Expert Comment

by:objects
ID: 34117084
check your applications logs
0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 34118420
check this in ur web.xml ... is there are not ?

      <filter>  
        <filter-name>struts2</filter-name>  
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>  
    </filter>  
   
    <filter-mapping>  
        <filter-name>struts2</filter-name>  
        <url-pattern>/*</url-pattern>  
    </filter-mapping>

0
 
LVL 20

Expert Comment

by:Sathish David Kumar N
ID: 34118427
it may be strutsConfig.xml pblm .. check whether all are propely define .
0
 

Author Comment

by:sbweitzman
ID: 34122392
hmmm... I'm getting a 404 error... and when I try to hit a jsp page with any struts tag in it, I get the stated error.

Any ideas at all??  Or is WebLogic the piece I think it is?
0
 

Author Comment

by:sbweitzman
ID: 34122934
Ok... so... Looking at the logs, I find this when trying to deploy in EXPLODED MODE:

Nov 12, 2010 10:08:18 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts-default.xml]
Nov 12, 2010 10:08:18 AM com.opensymphony.xwork2.util.logging.jdk.JdkLogger error
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - zip:/Users/stuartw/Documents/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/struts2-blank-2.2.1/beadep/swm/struts2-blank-2.2.1/WEB-INF/lib/struts2-core-2.2.1.jar!/struts-default.xml:54:89


Now, switching to SPLIT deployment causes an error:

Error with publish task 'Split Source Mapping Generation Task'.
Error processing split source mapping:
 '/Users/stuartw/Documents/workspace/struts2-blank-2.2.1/ImportedClasses'='/WEB-INF/classes/'

WebLogic split source deployment only supports resource folder mapping to EAR or web content root.
Please change the deployment mode to exploded archive in Server Editor.

Argh... can anyone help here?


Error with publish task 'Split Source Mapping Generation Task'.
Error processing split source mapping:
 '/Users/stuartw/Documents/workspace/struts2-blank-2.2.1/ImportedClasses'='/WEB-INF/classes/'

WebLogic split source deployment only supports resource folder mapping to EAR or web content root.
Please change the deployment mode to exploded archive in Server Editor.

Open in new window

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:sbweitzman
ID: 34123259
ALRIGHT... so there MUST be a setting in my Eclipse Helios that's doing this... It looks like it can't find the jar files for Freemarker, but they DO exist in the project.  My assembly settings show that they're in the WEB-INF lib dir

ANYONE>???>?>>
0
 
LVL 92

Expert Comment

by:objects
ID: 34125280
are they in your build path?
0
 

Author Comment

by:sbweitzman
ID: 34141070
they should be.. how can I tell?
0
 
LVL 92

Accepted Solution

by:
objects earned 500 total points
ID: 34141117
right click on project and select Build Path> Configure Build Path
0
 

Author Comment

by:sbweitzman
ID: 34251968
Hey folks,

I'm still REALLY frustrated with this.  If there is ANYONE out there that knows WEBLOGIC 11G  and Struts, I could really use some help.

This is using Mac OSX, Weblogic 10.3.3, and no matter what I do, I can't get this damn thing to startup.  Any help at all would be appreciated.

The latest stack trace:
Dec 1, 2010 12:30:53 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger info
INFO: Parsing configuration file [struts-default.xml]
Dec 1, 2010 12:30:53 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger error
SEVERE: Dispatcher initialization failed
Unable to load configuration. - bean - zip:/Users/stuartw/Documents/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/Basic_Struts2_Ant/beadep/struts/Basic_Struts2_Ant/WEB-INF/lib/struts2-core-2.2.1.jar!/struts-default.xml:54:89
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:69)
      at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:371)
      at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:415)
      at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:69)
      at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:51)
      at weblogic.servlet.internal.FilterManager$FilterInitAction.run(FilterManager.java:332)
      at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
      at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
      at weblogic.servlet.internal.FilterManager.loadFilter(FilterManager.java:98)
      at weblogic.servlet.internal.FilterManager.preloadFilters(FilterManager.java:59)
      at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1867)
      at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:3126)
      at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1512)
      at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:486)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
      at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
      at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:247)
      at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
      at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
      at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
      at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:1267)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:41)
      at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:409)
      at weblogic.application.internal.SingleModuleDeployment.activate(SingleModuleDeployment.java:43)
      at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:161)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:150)
      at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:116)
      at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:844)
      at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1253)
      at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:440)
      at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:195)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:13)
      at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:68)
      at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: Unable to load bean: type: class:org.apache.struts2.views.freemarker.FreemarkerManager - bean - zip:/Users/stuartw/Documents/workspace/.metadata/.plugins/org.eclipse.core.resources/.projects/Basic_Struts2_Ant/beadep/struts/Basic_Struts2_Ant/WEB-INF/lib/struts2-core-2.2.1.jar!/struts-default.xml:54:89
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:232)
      at org.apache.struts2.config.StrutsXmlConfigurationProvider.register(StrutsXmlConfigurationProvider.java:101)
      at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:180)
      at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:66)
      ... 42 more
Caused by: java.lang.NoClassDefFoundError: freemarker/template/TemplateException
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      at java.lang.Class.getDeclaredConstructors(Class.java:1836)
      at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.register(XmlConfigurationProvider.java:222)
      ... 45 more
Caused by: java.lang.ClassNotFoundException: freemarker.template.TemplateException
      at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
      at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
      at weblogic.utils.classloaders.ChangeAwareClassLoader.findClass(ChangeAwareClassLoader.java:56)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
      at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)
      at weblogic.utils.classloaders.ChangeAwareClassLoader.loadClass(ChangeAwareClassLoader.java:37)
      ... 49 more

I just can't get past this, and am about ready to jump.

Stu
0
 
LVL 92

Assisted Solution

by:objects
objects earned 500 total points
ID: 34252701
looks like your missing the freemarker jar
0
 

Author Comment

by:sbweitzman
ID: 34336482
So I figured out that, in Weblogic on a Mac, you have to include the Freemarker.jar and the JavaAssist jars in the LIB directory of the starting domain.  Once I did that, everything worked.

Seriously folks, there needs to be ONE PLACE where Weblogic info can be found regarding Struts, even though it's a dying technology.  Here's hoping that future technologies don't get so fragmented.

Stu
0
 

Author Closing Comment

by:sbweitzman
ID: 34336503
I took a ton of reading to figure this out, but "object" still pointed me in the right direction.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now