Hi All,
I have been trying all sort of different things to deploy my .ear file on OC4J that has struts used in .war file. The same .ear file deploys correctly and works fine on runtime for my Standalone OC4J10.1.2 on windows but when I try to deploy it on UNIX box for Standalone OC4J10.1.2 it does deploy right but it breaks runtime on access to login.jsp as soon as it finds the first struts tag.
Pl help me asap. I have no idea, if this version of struts is not supported by this version of OC4J or what?
Here is the config for web.xml
--------------------------
----------
------
<servlet>
<servlet-name>action</serv
let-name>
<servlet-class>org.apache.
struts.act
ion.Action
Servlet</s
ervlet-cla
ss>
<init-param>
<param-name>application</p
aram-name>
<param-value>ApplicationRe
sources</p
aram-value
>
</init-param>
<init-param>
<param-name>config</param-
name>
<param-value>/WEB-INF/stru
ts-config.
xml</param
-value>
</init-param>
<init-param>
<param-name>debug</param-n
ame>
<param-value>2</param-valu
e>
</init-param>
<init-param>
<param-name>detail</param-
name>
<param-value>2</param-valu
e>
</init-param>
<load-on-startup>2</load-o
n-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</serv
let-name>
<url-pattern>*.do</url-pat
tern>
</servlet-mapping>
--------------------------
----------
----------
----------
----------
---------
My all struts related jars are located at WEB-INF/lib
commons-fileupload.jar
commons-logging.jar
commons-digester.jar
commons-beanutils.jar
commons-validator.jar
jakarta-oro.jar
antlr.jar
struts.jar
I am not specifying any classpath as the server should pick up libraries from WEB-INF/lib.
Here is my login.jsp
--------------------------
--
<%@ page contentType="text/html;cha
rset=windo
ws-1252"%>
<%@ taglib uri="
http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="
http://struts.apache.org/tags-bean" prefix="bean" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<style type="text/css" media="screen">
@import url(<html:rewrite page="/COES/css/coes.css" />);
</style>
<script type="text/javascript" language="Javascript"
src="/COES/javascript/coes
.js">
</script>
<script type="text/javascript" language="Javascript"
src="/COES/javascript/date
functions.
js">
</script>
<title><bean:message key="coes.title"/></title>
<!-- Begin Validator Javascript Function-->
<html:javascript formName="LoginForm"/>
<!-- End of Validator Javascript Function-->
</head>
<body>
<table>
<tr><td class="errors"><html:error
s/></td></
tr>
<tr>
<td>
<table width="100%" class="headertable" border="0">
<tr>
<td width="1%"><html:image page="/img/nexcomlogo.gif"
styleClass="css/headerLogo
Image" altKey="coes.build"/></td>
<td align="center"><bean:messa
ge key="coes.title"/> - <bean:message key="coes.version"/>
</td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<html:form action="Login" onsubmit="return validateLoginForm(this);">
Enter your location passcode:
<html:password property="passcode"/>
<html:submit property="login"
styleClass="smallblackbutt
on"
value="Log In"
onmouseover="javascript:go
Lite(this)
"
onmouseout="javascript:goD
im(this)"
/>
</html:form>
</td>
</tr>
</table>
</body>
</html>
--------------------------
-----
It breaks at line
@import url(<html:rewrite page="/COES/css/coes.css" />);
and on browser I see err
java.lang.NullPointerExcep
tion at org.apache.struts.taglib.T
agUtils.pa
geURL(TagU
tils.java:
1070) at org.apache.struts.taglib.T
agUtils.co
mputeURLWi
thCharEnco
ding(TagUt
ils.java:4
49) at org.apache.struts.taglib.h
tml.Rewrit
eTag.doSta
rtTag(Rewr
iteTag.jav
a:55) at _jsp._login._jspService(_l
ogin.java:
51) [SRC:/jsp/login.jsp:12] at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHt
tpJspPage.
service(Or
ionHttpJsp
Page.java:
56) at oracle.jsp.runtimev2.JspPa
geTable.se
rvice(JspP
ageTable.j
ava:350) at oracle.jsp.runtimev2.JspSe
rvlet.inte
rnalServic
e(JspServl
et.java:50
9) at oracle.jsp.runtimev2.JspSe
rvlet.serv
ice(JspSer
vlet.java:
413) at javax.servlet.http.HttpSer
vlet.servi
ce(HttpSer
vlet.java:
853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.
ResourceFi
lterChain.
doFilter(R
esourceFil
terChain.j
ava:65) at oracle.security.jazn.oc4j.
JAZNFilter
.doFilter(
Unknown Source) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.
ServletReq
uestDispat
cher.invok
e(ServletR
equestDisp
atcher.jav
a:663) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.
ServletReq
uestDispat
cher.forwa
rdInternal
(ServletRe
questDispa
tcher.java
:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.
HttpReques
tHandler.p
rocessRequ
est(HttpRe
questHandl
er.java:83
0) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.
HttpReques
tHandler.r
un(HttpReq
uestHandle
r.java:285
) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.
HttpReques
tHandler.r
un(HttpReq
uestHandle
r.java:126
) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.Releasa
bleResourc
ePooledExe
cutor$MyWo
rker.run(R
eleasableR
esourcePoo
ledExecuto
r.java:186
) at java.lang.Thread.run(Threa
d.java:568
)
--------------------------
----------
----------
---------
The log file always shows below err, no matter what change I make:
[17 Nov 2006 10:22:24] ERROR [Digester] Digester.getParser:
org.xml.sax.SAXNotRecogniz
edExceptio
n:
http://apache.org/xml/features/validation/dynamicat oracle.xml.jaxp.JXSAXParse
rFactory.s
etFeature(
JXSAXParse
rFactory.j
ava:128)
at org.apache.commons.digeste
r.parser.X
ercesParse
r.configur
eXerces(Xe
rcesParser
.java:185)
at org.apache.commons.digeste
r.parser.X
ercesParse
r.newSAXPa
rser(Xerce
sParser.ja
va:138)
at org.apache.commons.digeste
r.ParserFe
atureSette
rFactory.n
ewSAXParse
r(ParserFe
atureSette
rFactory.j
ava:73)
at org.apache.commons.digeste
r.Digester
.getParser
(Digester.
java:682)
at org.apache.commons.digeste
r.Digester
.getXMLRea
der(Digest
er.java:89
1)
at org.apache.commons.digeste
r.Digester
.parse(Dig
ester.java
:1572)
at org.apache.struts.action.A
ctionServl
et.parseMo
duleConfig
File(Actio
nServlet.j
ava:738)
at org.apache.struts.action.A
ctionServl
et.initMod
uleConfig(
ActionServ
let.java:6
87)
at org.apache.struts.action.A
ctionServl
et.init(Ac
tionServle
t.java:333
)
at javax.servlet.GenericServl
et.init(Ge
nericServl
et.java:25
8)
at com.evermind.server.http.H
ttpApplica
tion.loadS
ervlet(Htt
pApplicati
on.java:23
54)
at com.evermind.server.http.H
ttpApplica
tion.findS
ervlet(Htt
pApplicati
on.java:47
95)
at com.evermind.server.http.H
ttpApplica
tion.initP
reloadServ
lets(HttpA
pplication
.java:4889
)
at com.evermind.server.http.H
ttpApplica
tion.initD
ynamic(Htt
pApplicati
on.java:10
15)
at com.evermind.server.http.H
ttpApplica
tion.<init
>(HttpAppl
ication.ja
va:549)
at com.evermind.server.Applic
ation.getH
ttpApplica
tion(Appli
cation.jav
a:890)
at com.evermind.server.http.H
ttpServer.
getHttpApp
lication(H
ttpServer.
java:707)
at com.evermind.server.http.H
ttpSite.in
itApplicat
ions(HttpS
ite.java:6
25)
at com.evermind.server.http.H
ttpSite.se
tConfig(Ht
tpSite.jav
a:278)
at com.evermind.server.http.H
ttpServer.
setSites(H
ttpServer.
java:278)
at com.evermind.server.http.H
ttpServer.
setConfig(
HttpServer
.java:179)
at com.evermind.server.Applic
ationServe
r.initiali
zeHttp(App
licationSe
rver.java:
2394)
at com.evermind.server.Applic
ationServe
r.setConfi
g(Applicat
ionServer.
java:1551)
at com.evermind.server.Applic
ationServe
rLauncher.
run(Applic
ationServe
rLauncher.
java:92)
at java.lang.Thread.run(Threa
d.java:568
)
[17 Nov 2006 10:22:24] ERROR [ActionServlet] Unable to initialize Struts ActionServlet due to an unexpected exception or error thrown, so marking the servlet as unavailable. Most likely, this is due to an incorrect or missing library dependency.
java.lang.NullPointerExcep
tion
at org.apache.commons.digeste
r.Digester
.getXMLRea
der(Digest
er.java:89
1)
at org.apache.commons.digeste
r.Digester
.parse(Dig
ester.java
:1572)
at org.apache.struts.action.A
ctionServl
et.parseMo
duleConfig
File(Actio
nServlet.j
ava:738)
at org.apache.struts.action.A
ctionServl
et.initMod
uleConfig(
ActionServ
let.java:6
87)
at org.apache.struts.action.A
ctionServl
et.init(Ac
tionServle
t.java:333
)
at javax.servlet.GenericServl
et.init(Ge
nericServl
et.java:25
8)
at com.evermind.server.http.H
ttpApplica
tion.loadS
ervlet(Htt
pApplicati
on.java:23
54)
at com.evermind.server.http.H
ttpApplica
tion.findS
ervlet(Htt
pApplicati
on.java:47
95)
at com.evermind.server.http.H
ttpApplica
tion.initP
reloadServ
lets(HttpA
pplication
.java:4889
)
at com.evermind.server.http.H
ttpApplica
tion.initD
ynamic(Htt
pApplicati
on.java:10
15)
at com.evermind.server.http.H
ttpApplica
tion.<init
>(HttpAppl
ication.ja
va:549)
at com.evermind.server.Applic
ation.getH
ttpApplica
tion(Appli
cation.jav
a:890)
at com.evermind.server.http.H
ttpServer.
getHttpApp
lication(H
ttpServer.
java:707)
at com.evermind.server.http.H
ttpSite.in
itApplicat
ions(HttpS
ite.java:6
25)
at com.evermind.server.http.H
ttpSite.se
tConfig(Ht
tpSite.jav
a:278)
at com.evermind.server.http.H
ttpServer.
setSites(H
ttpServer.
java:278)
at com.evermind.server.http.H
ttpServer.
setConfig(
HttpServer
.java:179)
at com.evermind.server.Applic
ationServe
r.initiali
zeHttp(App
licationSe
rver.java:
2394)
at com.evermind.server.Applic
ationServe
r.setConfi
g(Applicat
ionServer.
java:1551)
at com.evermind.server.Applic
ationServe
rLauncher.
run(Applic
ationServe
rLauncher.
java:92)
at java.lang.Thread.run(Threa
d.java:568
)
Thanks
Jasmin
Start Free Trial