Struts 1.2.9 on OC4J 10.1.2 Not working
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</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>2</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>2</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</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;charset=windows-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/datefunctions.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:errors/></td></tr>
<tr>
<td>
<table width="100%" class="headertable" border="0">
<tr>
<td width="1%"><html:image page="/img/nexcomlogo.gif" styleClass="css/headerLogoImage" altKey="coes.build"/></td>
<td align="center"><bean:message key="coes.title"/> - <bean:message key="coes.version"/><br><br>
</td>
<td> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<html:form action="Login" onsubmit="return validateLoginForm(this);">
<b>Enter your location passcode:</b>
<html:password property="passcode"/>
<html:submit property="login"
styleClass="smallblackbutton"
value="Log In"
onmouseover="javascript:goLite(this)"
onmouseout="javascript:goDim(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.NullPointerException at org.apache.struts.taglib.TagUtils.pageURL(TagUtils.java:1070) at org.apache.struts.taglib.TagUtils.computeURLWithCharEncoding(TagUtils.java:449) at org.apache.struts.taglib.html.RewriteTag.doStartTag(RewriteTag.java:55) at jsp.login._jspService(_login.java:51) [SRC:/jsp/login.jsp:12] at com.orionserver[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:350) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java: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.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:663) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:285) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].server.http.HttpRequestHandler.run(HttpRequestHandler.java:126) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.0.2)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:186) at java.lang.Thread.run(Thread.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.SAXNotRecognizedException: http://apache.org/xml/features/validation/dynamic
at oracle.xml.jaxp.JXSAXParserFactory.setFeature(JXSAXParserFactory.java:128)
at org.apache.commons.digester.parser.XercesParser.configureXerces(XercesParser.java:185)
at org.apache.commons.digester.parser.XercesParser.newSAXParser(XercesParser.java:138)
at org.apache.commons.digester.ParserFeatureSetterFactory.newSAXParser(ParserFeatureSetterFactory.java:73)
at org.apache.commons.digester.Digester.getParser(Digester.java:682)
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:738)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:687)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4795)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4889)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1015)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:549)
at com.evermind.server.Application.getHttpApplication(Application.java:890)
at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:707)
at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:625)
at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:278)
at com.evermind.server.http.HttpServer.setSites(HttpServer.java:278)
at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:179)
at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1551)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)
at java.lang.Thread.run(Thread.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.NullPointerException
at org.apache.commons.digester.Digester.getXMLReader(Digester.java:891)
at org.apache.commons.digester.Digester.parse(Digester.java:1572)
at org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:738)
at org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:687)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:333)
at javax.servlet.GenericServlet.init(GenericServlet.java:258)
at com.evermind.server.http.HttpApplication.loadServlet(HttpApplication.java:2354)
at com.evermind.server.http.HttpApplication.findServlet(HttpApplication.java:4795)
at com.evermind.server.http.HttpApplication.initPreloadServlets(HttpApplication.java:4889)
at com.evermind.server.http.HttpApplication.initDynamic(HttpApplication.java:1015)
at com.evermind.server.http.HttpApplication.<init>(HttpApplication.java:549)
at com.evermind.server.Application.getHttpApplication(Application.java:890)
at com.evermind.server.http.HttpServer.getHttpApplication(HttpServer.java:707)
at com.evermind.server.http.HttpSite.initApplications(HttpSite.java:625)
at com.evermind.server.http.HttpSite.setConfig(HttpSite.java:278)
at com.evermind.server.http.HttpServer.setSites(HttpServer.java:278)
at com.evermind.server.http.HttpServer.setConfig(HttpServer.java:179)
at com.evermind.server.ApplicationServer.initializeHttp(ApplicationServer.java:2394)
at com.evermind.server.ApplicationServer.setConfig(ApplicationServer.java:1551)
at com.evermind.server.ApplicationServerLauncher.run(ApplicationServerLauncher.java:92)
at java.lang.Thread.run(Thread.java:568)
Thanks
Did you try changing the xml parser to use Xerces instead of Oracle?
http://www.oracle.com/technology/tech/java/oc4j/1013/how_to/how-to-swapxmlparser/doc/readme.html
It is a pretty long article.
Pat
Similar Messages
-
Remte JSP debugging for standalong OC4J 10.3.x not working
Follow the next steps:
1. Copying the ojc.jar, jdev-rt.jar and jdev-remote.jar to the OC4J_HOME/lib
directory
2. Add the next lines to the application.xml file
< !-- Remote Debug settings -->
< library path="../../../lib/jdev-rt.jar" />
< library path="../../../lib/ojc.jar" />
< library path="../../../lib/ojmisc.jar" />
3. Change the global-web-application.xml in a text editor.
From the following section:
< orion-web-app
jsp-cache-directory="./persistence"
servlet-webdir="/servlet"
development="false"
>
Change development="false" to development="true" to enable servlet
debugging.
4. In the global-web-application.xml file, modify the jsp servlet tags to be:
< servlet>
< servlet-name>jsp< /servlet-name>
< servlet-class>oracle.jsp.runtimev2.JspServlet< /servlet-class>
< init-param>
< param-name>debug_mode< /param-name>
< param-value>true< /param-value>
< /init-param>
< init-param>
< param-name>developer_mode< /param-name>
< param-value>true< /param-value>
< /init-param>
< init-param>
< param-name>encode_to_java< /param-name>
< param-value>true< /param-value>
< /init-param>
< init-param>
< param-name>emit_debuginfo< /param-name>
< param-value>true< /param-value>
< /init-param>
< init-param>
< param-name>jspjavacompiler< /param-name>
< param-value>oracle.jdevimpl.jsp.JspOjcCompiler< /param-value>
< /init-param>
< load-on-startup>0< /load-on-startup>
< /servlet>
5. Start the oc4j using the next command:
java -hotspot -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 -jar oc4j.jar
6. Deploy the application
7. Select the Remote Debugging and Profiling option in the Run Configuration
for the project with the jsp to debug.
8. In the Debugger/Remote section of the run Configuration set the host, port
and timeout to the correct ones (name of the computer where you are running
the application).
When trying to run the jsp you are going to get the error:
STACK ERROR:
07/12/28 11:56:56
....\j2ee\home\application-deployments\MyJ2eeApp\MyJ2eeApp\persistence\_pages\_MyPage
error #552: illegal forward reference
07/12/28 11:56:56 /*@lineinfo:filename=/MyPage.jsp*/
07/12/28 11:56:56
2007-12-28 11:56:57.703 NOTIFICATION J2EE JSP-0008 Unable to dispatch JSP
Page : oracle.classloader.util.AnnotatedClassNotFoundException:
Missing class: _MyPage
Dependent class: oracle.jsp.runtimev2.JspPageInfo
Loader: oc4j:10.1.3
Code-Source: ..../j2ee/home/lib/ojsp.jar
Configuration: < code-source> in META-INF/boot.xml in ....\j2ee\home\oc4j.jar
This load was initiated at MyJ2eeAppInfo.web.MyJ2eeAppInfo.jsp26687282:0.0.0 using the loadClass() method.
The missing class is not available from any code-source or loader in the system.
at oracle.classloader.PolicyClassLoader.handleClassNotFound
(PolicyClassLoader.java:2068) [/C:/sw/oracle/oc4j101330/j2ee/home/lib/pcl.jar
(from system property java.class.path), by sun.misc.Launcher$AppClassLoader@9627532]
Reproduced the problem with the next products:
JDev OC4J Reproduced?
10.1.3.3.0 10.1.3.2.0 YES
10.1.3.3.0 10.1.3.3.0 YES
10.1.3.2.0 10.1.3.2.0 YES
When i try not use the following tags section
< init-param>
< param-name>emit_debuginfo< /param-name>
< param-value>true< /param-value>
< /init-param>
everything is working, but ojc not generate debug information for compiled JSP page and debugger doesn't stop at break points.
When i try use thise tags section, i got the next instructions for compiler in MyPage.java (it is generated from MyPage.jsp):
/*@lineinfo:filename=/MyPage.jsp*/
/*@lineinfo:generated-code*/
and compiler is generating next message in console:
error #552: illegal forward reference
07/12/28 11:56:56 /*@lineinfo:filename=/MyPage.jsp*/
and doesn't want to compile MyPage.java.
I need help with this problem! And i don't have any ideas how to solve it. People, help me, please!Dear dvohra, have you ever try yourself the method, which you suggest?
It is not working!
If i try to configure OC4j like in blog, IDE doesn't stop in JSP's break points.
So, I need in 100% working solution for remote debugging on oc4j 10.3.x. The main reason of using remote debug for me is that i have to develop portlets, and i have to invoke my portlets from portal. It is posible only when i deploy my portlet on stand alone oc4j!
I really need remote debug! And i'll be very thankful someone for 100% working solution! -
OC4J admin console does not work with 9.0.3
I even tried this on a fresh installation.
As per the docs, "java -jar oc4j.jar -console" opens an admin interface with a swing GUI for admin purposes.
Has anyone a clue or this is a bug in this version ?
I have seen this working in a previous version.
Thanks,
SunilAre you talking about this, <provider>org.hibernate.ejb.HibernatePersistence</provider>? Is this the correct provider name for JPA with HIbernate 3?
or
You are talking about other configuration in the persistence.xml.
I appreciate you helps, but can you point out what exact is wrong in my configuration or provide examples? I have not found the correct name for Hibernate provider. -
Response.addCookie() not working on OC4j stand alone server
Hi,
I have problem with response.addCookie(). see the code below:
if ((isCookie == null)||(!(isCookie.equals("yes")))) {
String cookiestr="I am OK";
Cookie m_cookie = new Cookie("msign",cookieStr);
m_cookie.setMaxAge(300);
response.addCookie(m_cookie);
This part of the code is in Struts Action class. The read Cookie part is in JSP.
Cookie[] cookies= request.getCookies();
if(cookies != null)
for (int i = 0; i < cookies.length; i++)
if (cookies.getName().equals("msign"))
String infor = cookies[i].getValue();
response.sendRedirect("hellow.jsp");
break;
Add cookie and read cookie work fine on my computer If I runs application on JDeveloper 10g embeded OC4j server. I can see the cookie in the Temporary Internet files
However, I deployed the application on OC4j standalone server, it does not work. response.addCookie() does not work at all. The cookie is not sent to the browser at all. There is no this cookie in Temporary internet file. The page is not directed to hellow.jsp.
Does anybody here know why? Any idea?
Thank you very much!
jfu
Edited by: jfu on Dec 15, 2009 1:26 PMHi,
I have problem with response.addCookie(). see the code below:
if ((isCookie == null)||(!(isCookie.equals("yes")))) {
String cookiestr="I am OK";
Cookie m_cookie = new Cookie("msign",cookieStr);
m_cookie.setMaxAge(300);
response.addCookie(m_cookie);
This part of the code is in Struts Action class. The read Cookie part is in JSP.
Cookie[] cookies= request.getCookies();
if(cookies != null)
for (int i = 0; i < cookies.length; i++)
if (cookies.getName().equals("msign"))
String infor = cookies[i].getValue();
response.sendRedirect("hellow.jsp");
break;
Add cookie and read cookie work fine on my computer If I runs application on JDeveloper 10g embeded OC4j server. I can see the cookie in the Temporary Internet files
However, I deployed the application on OC4j standalone server, it does not work. response.addCookie() does not work at all. The cookie is not sent to the browser at all. There is no this cookie in Temporary internet file. The page is not directed to hellow.jsp.
Does anybody here know why? Any idea?
Thank you very much!
jfu
Edited by: jfu on Dec 15, 2009 1:26 PM -
Application restart not working in oc4j
I have an application that runs if I stop and start oc4j using stop and start options, but if I restart from em console it does not work properly eventhough em says the status is up.
Using oc4j 10.1.3.3
The application starts thread in ContextInitialzed() method of ServletListener which implements ServlerContextListener. Does it have to do anything with that.
Also the application does not log to the logger which is set using JVMARGS -Djava.util.logging.config.file in oc4j.cmd file. It logs when oc4j is stopped and started.
Any ideas?Greetings,
Are you looking in j2ee/home/log/oc4j/log.xml for your log information? Also, you can set the level of logging to FINEST in your j2ee-logging.xml. Once this is done please post the logging info relevant to your issue.
-Mike -
Working on Tomcat Server but same code is not working on oc4j server of E-B
Hello,
I have a jsp page that is working properly in tomcat 6 server but when i deployed it on oc4j server 10.1.3.1.0 than it is not working. I am confuse.
ERROR MESSAGE:
500 Internal Server Error
Servlet error: An exception occurred. The current application deployment descriptors do not allow for including it in this response. Please consult the application log for details.
CODE JSP:
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<!DOCTYPE html PUBLIC
"-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta
http-equiv="Content-Type"
content="text/html; charset=ISO-8859-1" />
<meta
name="author"
content="MAX" />
<title>Test Register Page</title>
<link
rel="stylesheet"
href="css/style.css"
type="text/css"
media="screen" />
</head>
<body>
<div id="content">
<form name="demo" onsubmit="return validate_form()" action="RegisterServlet" method="post">
<fieldset>
<legend>VIEW USER</legend>
<table border=1>
<tr>
<td width="200px" align="center"><b>Bank Name</b></td>
<td width="200px" align="center"><b>User Name</b></td>
</tr>
<%
Connection connection = null;
String connectionURL = "jdbc:oracle:thin:@10.38.60.55:1521:edwdevdb";
ResultSet rs = null;
Statement statement = null;
try
// Get a Connection to the database
Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
connection = DriverManager.getConnection(connectionURL,
"scott", "tiger");
statement = connection.createStatement();
rs = statement.executeQuery(" SELECT user_info.USER_KEY,user_info.FI_ID,d_fi.fi_nm, user_info.User_Name from user_info INNER join d_fi on user_info.fi_id = d_fi.fi_id order by fi_nm ");
//Set 'authentication' flag
while (rs.next())
%>
<tr>
<td width="200px"><a href="SearchUser?bankname=<%=rs.getString("USER_KEY")%">> <%= rs.getString("FI_NM")%></a> </td>
<td width="200px"><%= rs.getString("User_Name")%></td>
</tr>
<%
catch(SQLException e)
finally
rs.close();
statement.close();
connection.close();
%>
</table>
<label> </label>
</fieldset>
</form>
</div>
</body>
</html>
WEB xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
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/web-app_2_5.xsd"
version="2.5">
<description>Register</description>
<display-name>Register</display-name>
<!-- Declare Servlets -->
<servlet>
<servlet-name>BaseServlet</servlet-name>
<servlet-class>BaseServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>CategoryServlet</servlet-name>
<url-pattern>/Category</url-pattern>
</servlet-mapping>
<!-- Welcome File List -->
<welcome-file-list>
<welcome-file>login.jsp</welcome-file>
</welcome-file-list>
</web-app>
Edited by: bappy007 on Oct 10, 2010 1:57 AM
Edited by: bappy007 on Oct 10, 2010 1:58 AMERROR IN LOG FILE:
10/10/10 15:18:55.843 edwportal: Servlet error
java.lang.NullPointerException
at test.jspService(_test.java:93)
at com.orionserver[Oracle Containers for J2EE 10g (10.1.3.1.0) ].http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:453)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:591)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:515)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:711)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:368)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:866)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:448)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:216)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:117)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:110)
at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
at com.evermind[Oracle Containers for J2EE 10g (10.1.3.1.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
at java.lang.Thread.run(Thread.java:619) -
OC4J JSP Debugging not working for all the jsps
Hi,
Initially I was not able to debug jsps using Eclipse and OC4J. The jsp debugging started working once I made the below changes:
1) global-web-application.xml is modified
Changed the attribute development="true" in orion-web-app
Added the below init param for the JspServlet
<init-param>
<param-name>debug</param-name>
<param-value>class</param-value>
</init-param>
If the jsps are present in a sub directory under the webcontent none of the breakpoints are working. I am still be able to view the jsp pages on the browser.
Tools: Oracle 10g Application Server Standalone version(10.1.3.5.0), JDK5, Windows XP, Eclipse Indigo
Project Structure:
Test (Eclipse Dynamic Web Project)
-WebContent
Sample.jsp ( Breakpoints are working)
-subF (Folder)
SubSample.jsp (Breakpoints are not working)
-WEB-INF
web.xml
Debugging worked for http://localhost:8888/Test/Sample.jsp
Debugging not working for http://localhost:8888/Test/subF/SubSample.jsp
Any help is highly appreciated.
Regards
DannyThis tells there is not enough main memory (not disk space) for the program to run.
- You can look the dump in ST22, it will have suggestions on increasing the ROLLAREA??, you can forward that to Basis.
- Most likely you will not have any more memory to assign so the above may not be feasible. Try to rework your query so it works with less data. -
Client Side Javascript Validation not Working in Struts 1.x version
hi,
I'm following the steps provioded in the below link for Javascript Client side validation but still it is not working.I'm struggling to get this work.
[http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/|http://www.visualbuilder.com/jsp/struts/tutorial2/pageorder/9/]
"The framework automatically generates the browser specific JavaScript and validate the data only at the client side."From the above statement i undertstand that framework itself generates the javascript function for validating the field mentioned in validations.xml file so that we dont have to explicitly write a javascript function for
validating the fields
(or)
Do we need to call an explicit function
Please need help on this.
I have followed all the steps mentioned on the above link but Client Side Javascript Validation not Working in Struts 1.x version....
Thanks and Regards,
DeepakHi,
Please find my steps below....still getting an error.
2> which version of commons-validation.jar needs to be downloaded ...Link please
downloaded the latest commons-validation.jar and placed in lib.refreshed the project,and did a build.
3> which DTD name to be specified in "validator-rules.xml" which is in accordance to commons-validator.jar file.
validator-rules.xml ::
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">validation.xml:
<!DOCTYPE form-validation PUBLIC
"-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
"http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
i did as u said and im gettiong the below errorNov 5, 2009 4:33:08 PM org.apache.struts.validator.ValidatorPlugIn initResources
SEVERE: Invalid byte 2 of 2-byte UTF-8 sequence.
org.apache.commons.digester.xmlrules.XmlLoadException: Invalid byte 2 of 2-byte UTF-8 sequence.
at org.apache.commons.digester.xmlrules.FromXmlRuleSet.addRuleInstances(FromXmlRuleSet.java:139)
at org.apache.commons.digester.Digester.addRuleSet(Digester.java:1610)
at org.apache.commons.digester.xmlrules.DigesterLoader.createDigester(DigesterLoader.java:89)
at org.apache.commons.validator.ValidatorResourcesInitializer.initialize(ValidatorResourcesInitializer.java:122)
at org.apache.struts.validator.ValidatorPlugIn.initResources(ValidatorPlugIn.java:238)
at org.apache.struts.validator.ValidatorPlugIn.init(ValidatorPlugIn.java:181)
at org.apache.struts.action.ActionServlet.initModulePlugIns(ActionServlet.java:1036)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:455)
at javax.servlet.GenericServlet.init(GenericServlet.java:212)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1139)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:966)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3996)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4266)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:927)
at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:890)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:492)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1150)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1022)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:736)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1014)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:448)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:700)
at org.apache.catalina.startup.Catalina.start(Catalina.java:552)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:295)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:433)
Need help forum members.....
Please reply to my question 1 which has been asked before as belowDo i need to write explicit javascript function for validation in Struts (or) struts generates the javascript function by itself.??? Please explain with an example....
Edited by: Deepak_A_L on Nov 5, 2009 4:37 PM -
Please hepl me. i m intergrating ejb3 and struts in two server. but is not working
it is simple application i m runing in tow server but i m get classsnotfound error pleas solve my problem. i will give my direct structure of application
i m runing ejb3 in weblogic 10.3 and struts in tomcat server. both communication is not happening pleas help me. i m try from many days. But is not working form me
root dir
onlyenb6
account class
package ejb3.onlyejb;
import java.io.Serializable;
import javax.persistence.Entity;
import javax.persistence.Id;
@Entity
public class account implements Serializable{
@Id
int accno;
public int getAccno() {
return accno;
public void setAccno(int accno) {
this.accno = accno;
public String getName() {
return name;
public void setName(String name) {
this.name = name;
public float getBalance() {
return balance;
public void setBalance(float balance) {
this.balance = balance;
String name;
float balance;
Int6_clss code
package ejb3.onlyejb;
import java.io.Serializable;
public interface Int6_cls extends Serializable {
public void storing(int acc, String name, float amt);
Session.class code
package ejb3.onlyejb;
import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@Stateless(mappedName="saigoud")
@Remote
public class Session_ben implements Int6_cls {
@PersistenceContext
EntityManager mrg;
public void storing(int acc, String name, float amt) {
System.out.println("session="+acc);
System.out.println("sess="+name);
account accs=new account();
accs.setAccno(acc);
accs.setName(name);
accs.setBalance(amt);
mrg.persist(accs);
build.xml
<project name="onlyejb5" default="saifile">
<property name="bea.home" value="C:/bea"/>
<property name="wl_home" value="${bea.home}/wlserver_10.3"/>
<path id="main.class.path">
<pathelement path="${bea.home}/modules/com.bea.core.utils_1.4.0.0.jar"/>
<pathelement path="${bea.home}/modules/com.bea.core.jarbuilder_1.2.0.0.jar"/>
<pathelement path="${java.class.path}"/>
</path>
<target name="saifile">
<echo message="***ANT Script should run from inside the ${wl.home}/server/lib *****" />
<echo message="***** ********* ********* *****" />
<java classname="com.bea.jarbuilder.JarBuilder">
<classpath refid="main.class.path"/>
<jvmarg value="-d ${wl.home}/server/lib -jar wljarbuilder.jar"/>
</java>
</target>
</project>
after run with ant i get successfully create wlfullclient.jar
i m taking this wlfullclient.jar and pasting in tomcat lib directery and run webapplication
my webapplication code
package ejb3.onlyejb;
import java.io.Serializable;
public interface Int6_cls extends Serializable {
public void storing(int acc, String name, float amt);
package ejb3.onlywed;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Properties;
import javax.ejb.EJB;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import ejb3.onlyejb.Int6_cls;
public class Action_cls extends Action {
public ActionForward execute(ActionMapping map, ActionForm fm, HttpServletRequest req, HttpServletResponse res)
throws IOException{
String respkey="fails";
Action_form_bean bean=(Action_form_bean)fm;
int ac=bean.getAccno();
String na=bean.getName();
float bal=bean.getAmt();
System.out.println("accno="+ac);
System.out.println("na="+na);
System.out.println("bal="+bal);
System.out.println("enter in to if loop");
Hashtable p=new Hashtable();
p.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,"t3://localhost:7001");
System.out.println("jndi properties nuderprocess");
try {
System.out.println("loading p file="+p);
InitialContext ic = new InitialContext(p);
System.out.println("loading p file over="+ic);
System.out.println("jndi file is loaded");
//System.out.println("wrs="+wrs);
System.out.println("entry in try block");
Int6_cls wrs=(Int6_cls)ic.lookup("saigoud#ejb3.onlyejb.Int6_cls");
System.out.println("lookup susfull");
wrs.storing(ac, na, bal);
respkey="ok";
} catch (NamingException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
catch (Exception e) {
// TODO: handle exception
ActionForward fw=map.findForward(respkey);
return fw;
get error
accno=44
na=hjhjhj
bal=777.0
enter in to if loop
jndi properties nuderprocess
jndi properties nuderprocess22
loading p file={java.naming.provider.url=t3://localhost:7001, java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory}
loading p file over=javax.naming.InitialContext@12f9bcd
jndi file is loaded
entry in try block
Jul 5, 2013 1:36:22 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet action threw exception
java.lang.ClassNotFoundException: ejb3.onlyejb.Int6_cls
at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.getClassBytes(RemoteBizIntfClassLoader.java:151)
at weblogic.ejb.container.deployer.RemoteBizIntfClassLoader.loadClass(RemoteBizIntfClassLoader.java:96)
at weblogic.ejb.container.internal.RemoteBusinessIntfGenerator.generateRemoteInterface(RemoteBusinessIntfGenerator.java:54)
at weblogic.ejb.container.internal.RemoteBusinessIntfProxy.readObject(RemoteBusinessIntfProxy.java:205)
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:597)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1846)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1945)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:564)
at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
at weblogic.jndi.internal.ServerNamingNode_1030_WLStub.lookup(Unknown Source)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:392)
at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:380)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at ejb3.onlywed.Action_cls.execute(Action_cls.java:62)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)Locking multipost.
-
Embedded OC4J Bindings Not Working
I am having trouble with loading an AppModule using the 10.1.3 OC4J Embedded AS. When try creating an ADF panel binding I get the following error:
javax.naming.NamingException: Lookup error: javax.naming.AuthenticationException: No such domain/application: "current-workspace-app/current-workspace-app";
However, I can get a working reference to the AppModule using:
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.SECURITY_PRINCIPAL, "oc4jadmin");
env.put(Context.SECURITY_CREDENTIALS, "welcome");
env.put(Context.PROVIDER_URL, "ormi://localhost:" + RMI_PORT + "/current-workspace-app");
Context ctx = new InitialContext(env);
AppModuleHome ejbhome = (AppModuleHome)PortableRemoteObject.narrow(ctx.lookup("AppModuleBean"), AppModuleHome.class);
RemoteAppModule ejb = ejbhome.create(env);
but I cannot use that in a data binding. Why does the first one using the generated code not work?Hi,
tried with JDeveloper 10.1.3.3 and this works for me. Try JDeveloper 10.1.3.3 - if it doesn't work, have a closer look at your sessionFacade
Frank -
Servlet forward not working with portal and oc4j
Scenario: page1.jsp, page2.jsp, MyServlet
Page1.jsp posts a form to MyServlet which then does some processing and forwards to page2.jsp.
Tests:
Works fine as a standalone app under oc4j.
Does not work as oc4j-driven portlet under latest portal. Specifically, it conks out on the forward.
Question:
Why?
What is the suggested workaround?
Michael Mogley
Software Engineer
LRN, Inc.James, thanks for responding but you are misunderstanding the problem. I have been able to do multipage and form-submit portlets as you describe for a long time. The issue is I am not able to use the jsp-forward directive within a validation servlet when using oc4j with portal. Here is what I'm trying to do in pseudocode:
EntryPoint.jsp
1. Enter form data.
2. Submit form to MyServlet.
MyServlet
1. Validate form.
2. If valid, <jsp-forward page="success.jsp"/>.
3. Else, <jsp-forward page="failure.jsp"/>.
The above works fine when used in an app running on oc4j outside of portal. It does not work when the same oc4j app is portletized. By the way, the portletized app WILL work if I change jsp-forward to jsp-include. So the problem is obviously in the forwarding.
Michael
I would try looking at the samples in the PDK-Java V2 that show how to do form input and multipage behavior. The form input shows you how to make a form in a portlet that when you submit it, the entered values appear in the portlet. The multipage portlet shows you how to have a portlet display one page and then when you click on a link, it shows you the second page.
It may make sense to copy the same code used for the samples and just tweak it to create a form that passes values from page1 to page2.
For more info on V2 parameters, see the article "A Primer on Parameters and Events" in the PDK-Previews (for subscribers to Developer Services only). You can also see the V1 article called "Understanding the Parameter Passing Portlet" for more info on parameter passing with portlets in V1.
James
James -
Struts tag not working with Jbo Tag-BUG??
Hi
I am developing application using Struts with BC4J and encountered this problem.
In a JSP page if I have <jbo:DataScroller> tag and <html:cancel /> button, the button is not working.
If I remove the datascroller tag cancel button works fine (the way it should).
Not sure why this is happening, can Jdev team look into this.
ThanksSashi N Ravipati wrote : "Not using a DataScroller tag within a form tag is impossible. If u have an example of it let me know."
File > New > Web Tier > Struts-Based JSP for Business Components > Complete Struts-Based JSP Application
One of the files it generated for me was EmpView1_Browse.jsp:
<%@ page language="java" import="oracle.jbo.*" errorPage="errorpage.jsp" contentType="text/html;charset=windows-1252" %>
<%@ taglib uri="/webapp/DataTags.tld" prefix="jbo" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<html>
<head>
<META NAME="GENERATOR" CONTENT="Oracle JDeveloper">
<LINK REL=STYLESHEET TYPE="text/css" HREF="bc4j.css">
<TITLE><bean:message key="browse.title"/></TITLE>
</head>
<body>
<jbo:DataTransaction appid="JdevModuleDataModel" />
<h3><bean:message key="browse.header" arg0="EmpView1"/></h3>
<table border="0">
<tr>
<td ALIGN="right"><jbo:DataScroller datasource="JdevModuleDataModel.EmpView1"/></td>
</tr>
<tr>
<td><jbo:DataTable datasource="JdevModuleDataModel.EmpView1" edittarget="/edit_EmpView1.do"/></td>
</tr>
</table>
</body>
</html>A jbo:DataScroller tag is used and it is not within a form tag.
success
-Jan -
The target struts-config.xml cannot be started because it is not a runnable
I'm tying to run the Tree Binding example (ADF UIX Tree Binding Sample) -- (http://otn.oracle.com/sample_code/products/jdev/index.html).
I have defined an application workspace and DB connection for it, but get this error when I attempt to "run" the ViewJSP project.
"The target struts-config.xml cannot be started because it is not a runnable target."
Running JDev 9051 against DB9i. I am new to this version of JDev, but have familiarity with the previous releases (904x).
What do I need to do here? How to I configure JDev and to make "structs-config.xml" a "runnable" target?
Any help would be appreciated.You need to run one of the components in struts-config.xml, like a JSP page or struts action.
Select the starting page or action in struts page flow, right mouse and choose run.
raghu
JDev Team -
Using Struts with JDeveloper, BC4J and OC4J 9.0.2
Is it feasible to use Struts with JDeveloper 9.0.2, BC4J 9.0.2 and OC4J 9.0.2? We have an application that uses the BC4J JBO tags in version 9.0.2. We wish to use Struts and we want to retain the use of the JBO tags. Is there a way to do this without upgrading to 9.0.3?
Here are two related questions:
Can we upgrade to oracle9iAS 9.0.3 yet still use JDeveloper 9.0.2 and BC4J/JBO 9.0.2?
Can we upgrade to JDeveloper 9.0.3 and BC4J/JBO 9.0.3 yet still deploy to oracle9iAS 9.0.2? -
Struts 1.1-b2 and OC4J R2
Has anyone successfully deployed an struts 1.1-b2 application to a Release 2 app server? I have it working locally in JDeveloper but get the "message resource not found" error once I deploy to the container. The struts.jar is in the web-inf/lib, the properties files are in the web-inf/classes directory after deployment.
RuthI got the app up and running, but some info on the struts mailing list suggest you need to make configuration changes to certain files on the server, such as adding the struts jars as library entries in the orion-application.xml file in the application deployments folder. Have you had to make configuration changes after deployment to get it to run smoothly or are these workarounds for previous versions of struts and OC4J?
Ruth
Yes, we are able to do that. Since you have it loaded into JDeveloper, make your Struts source code available and step through it, so you can find out where the process isn't working the way you expect.
Maybe you are looking for
-
I was not sure where to post this, but trial and error is suggesting that this is an iTunes (possibly Mountain Lion) issue rather than a fault with my external Super Drive. I am using the current iMac (the one with no internal Superdrive) and an exte
-
Created a project that logs the results to a .txt file that was setup in "Source File Settings" as a subfolder "Test Results", but when I run the .exe it trys to write the results to a folder with the same name as my .exe file. I must have something
-
INSERT PICTURE USING ABAP OBJECTS
Hello friends , can any1 of u tel hw come can i insert a desktop picture in to the abap list using abap objecs apart frm se78... sakthi
-
Advice on software for creating pdf's
What is the best option for software to create pdf's?I downloaded Primo PDF and the quality was lousy. Suggestions greatly appreciated!
-
My new Macbook Pro 13" won't register properly on our school's projectors when I try to run PPT (Epson EB510)! Instead, colored bars go across the screen against a black background. No matter how much I try to adjust the displays, PPT won't show on