Performance problem JSP/JSTL/DB
Hello,
I have the following code in my jsp page:
<sql:query var="rs" dataSource="jdbc/TestDB">
SELECT id, t, d, c, desc, cd, isActive, ct
FROM ram
ORDER BY i DESC;
</sql:query>
<pg:paging pageSize="50" indexSize="10">
<c:forEach var="row" items="${rs.rows}" varStatus = "status">
<c:if test="${row.isActive=='5234526723175'}" >
<pg:item>
// here goes some HTML code where I embed the following:
${row.c}
${row.t}
${row.d}
${row.cd}
${row.desc}
${row.id}
</pg:item>
</c:if>
</c:forEach>
<pg:index>
<pg:t> </pg:t>
<pg:page>
<%=thisPage%>
</pg:page>
<pg:nextPages>Next</pg:nextPages>
<pg:prevPages>Back</pg:prevPages>
</pg:index>
</pg:paging> When SELECT returns a resultSet with 10 000 entries (I loaded the DB with some dummy data) the performace goes down.
For instance to load this page with 10 000 records takes up to 7 seconds.
Here is the table definition:
CREATE TABLE ir
id MEDIUMINT NOT NULL AUTO_INCREMENT,
t varchar(100),
d varchar(40),
c int,
desc varchar(2000),
cd varchar(20),
dateForCleanUp varchar(20),
email varchar(40),
isActive int,
randomIntegerForDeletion int,
ct int,
PRIMARY KEY (id)
);What can be done to improve performance?
I tried alter the table and created index on id but it did not help.
Thanks
Hello,
I have the following code in my jsp page:
<sql:query var="rs" dataSource="jdbc/TestDB">
SELECT id, t, d, c, desc, cd, isActive, ct
FROM ram
ORDER BY i DESC;
</sql:query>
<pg:paging pageSize="50" indexSize="10">
<c:forEach var="row" items="${rs.rows}" varStatus =
= "status">
<c:if test="${row.isActive=='5234526723175'}" >
<pg:item>
// here goes some HTML code where I embed the
d the following:
${row.c}
${row.t}
${row.d}
${row.cd}
${row.desc}
${row.id}
</pg:item>
</c:if>
</c:forEach>
<pg:index>
<pg:t> </pg:t>
<pg:page>
<%=thisPage%>
</pg:page>
<pg:nextPages>Next</pg:nextPages>
<pg:prevPages>Back</pg:prevPages>
</pg:index>
</pg:paging> When SELECT returns a resultSet with 10 000 entries
s (I loaded the DB with some dummy data) the
performace goes down.
For instance to load this page with 10 000 records
s takes up to 7 seconds.
Here is the table definition:
CREATE TABLE ir
id MEDIUMINT NOT NULL AUTO_INCREMENT,
t varchar(100),
d varchar(40),
c int,
desc varchar(2000),
cd varchar(20),
dateForCleanUp varchar(20),
email varchar(40),
isActive int,
randomIntegerForDeletion int,
ct int,
PRIMARY KEY (id)
);What can be done to improve performance?
I tried alter the table and created index on id but
it did not help.
Thanksa) look at gmail it retrives more inf but displays only some so as to increase scalabilty
so for your pblm
use multi threaded environment
modify the query
by giving RowNum rn rn =10
so it displays only 10 results
rownum is psedo column givs the number of rows to be retrivued
so it increses scalabilty
Similar Messages
-
JSP causes serious performance problem in my EP
I have a native JSP application and running it on the EP. This application accessing a Oracle db (using oracle.jdbc.driver.OracleDriver driver).
When this db not running, my EP doesn't open any page. The EP try to connect with this db, but not get success.
I modify this application with TRY and CATCH to treat the application problem, but the EP problem continues.
In the EP Thread Overview (System Adm -> Monitoring -> Portal -> Thread Overview), I see threads (locked) about this application. To unlock this threads, I delete the par file from the Portal and re-deploy it.
When this threads is deleted, the application treat the problem (display a error message in the iView container) and EP work normally.
My questions:
1) Exists some way that the problem with this application does not cause performance problems with the EP (via code or property)?
2) Exists some property in the Config Tool where I configure the connection timeout for access the external DB?
3) Exists some way to liberate these (locked) threads of the EP (I see the page Clearing the Portal Runtime Cache - http://help.sap.com/saphelp_nw04/helpdata/en/d2/a216e1bd7b431c82fa5ff105187112/frameset.htm - but I don't know if I can use it for this)
I use EP 6.0 SP 15.
Thanks,
Yuri Fiori de AlmeidaHi Umair,
the code is:
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" %>
<%@ include file="isa_cad.jsp" %>
<%
Connection Connselect_localidade = null;
try{
Driver Driverselect_localidade = (Driver)Class.forName(MM_isa_cad_DRIVER).newInstance();
Connselect_localidade = DriverManager.getConnection(MM_isa_cad_STRING,MM_isa_cad_USERNAME,MM_isa_cad_PASSWORD);
PreparedStatement Statementselect_localidade = Connselect_localidade.prepareStatement("SELECT DISTINCT X AS Y FROM Z.K WHERE W = 1 ORDER BY X");
ResultSet select_localidade = Statementselect_localidade.executeQuery();
boolean select_localidade_isEmpty = !select_localidade.next();
boolean select_localidade_hasData = !select_localidade_isEmpty;
Object select_localidade_data;
int select_localidade_numRows = 0;
%>
<!---- Page Layout --->
<%
select_localidade_hasData = select_localidade.next();
select_localidade.close();
Statementselect_localidade.close();
//Connselect_localidade.close();
%>
<!---- Page Layout --->
<%
catch(Exception e){
%>
<!---- Page Layout ---><%
finally{
try{
if(Connselect_localidade != null) Connselect_localidade.close();
catch(Exception e){
%>
Thanks,
Yuri. -
JRC 2: Performance Problem
Hi.
Our reporting component used JRC 1.x before we upgraded to JRC 2.x. We got two issues after upgrading.
First issue I solved already with a workaround which I published on stackoverflow.com. (1) Does anyone knows where I will find the issue management system to report this issue?
Second issue occurs big performance problem within our project. We opened a report with 6 subreports (which includes 1 upto 3 tables) in 2-4 seconds using JRC 1. If we will open same report using JRC 2, we wait upto 60 seconds.
This methods requires more time with JRC 2 comparing to JRC 1:
ReportClientDocument#open(String, int);
SubreportController#setTableLocation(String, ITable, ITable)
DatabaseController#setTableLocation(ITable, ITable)
Each invocation of one of these methods requires 2-4 seconds.
Thank you in advance.
Best regards
Thomas
(1) http://stackoverflow.com/questions/479405/replace-a-database-connection-for-subreports-with-jrchello ....
my report is ''crystal report 11'' => "OLE DB" => "Add Command(select * from table) " .
code(JRC) : eclipse + crystal report for eclipse version 2 => "cr4e-all-in-one-win_2.0.1.zip"
<%@ page contentType="text/html; charset=UTF-8"
import="
com.crystaldecisions.report.web.viewer.CrystalReportViewer,
com.crystaldecisions.reports.sdk.ReportClientDocument,
com.crystaldecisions.sdk.occa.report.lib.ReportSDKExceptionBase,
java.sql.Connection,
java.sql.DriverManager,
java.sql.ResultSet,
java.sql.SQLException,
java.sql.Statement" %>
<%
try {
String reportName = "report.rpt";
ReportClientDocument clientDoc = new ReportClientDocument();
clientDoc.open(reportName, 0);
String tableAlias = "Command";
clientDoc.getDatabaseController().setDataSource(myResult("SELECT * FROM table"), tableAlias,tableAlias);
CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
crystalReportPageViewer.setReportSource(clientDoc.getReportSource());
crystalReportPageViewer.processHttpRequest(request, response, application, null);
} catch (ReportSDKExceptionBase e) {
e.printStackTrace();
out.println(e);
%>
I simplified the code, *myResult("SELECT * FROM table") * is absolutely no problem ,
and this code is absolutely no problem in the "crystal report for eclipse "version 1
but in version 2 run error:
com.crystaldecisions.sdk.occa.report.lib.ReportSDKException: u7121u6CD5u9810u671Fu7684u8CC7u6599u5EABu9023u7DDAu5668u932Fu8AA4---- Error code:-2147467259 Error code name:failed
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.if(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.a(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter$2.call(Unknown Source)
at com.crystaldecisions.reports.common.ThreadGuard.syncExecute(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.for(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.int(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
at com.businessobjects.sdk.erom.jrc.a.a(Unknown Source)
at com.businessobjects.sdk.erom.jrc.a.execute(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent$a.execute(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.CommunicationChannel.a(Unknown Source)
at com.crystaldecisions.proxy.remoteagent.RemoteAgent.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.if(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.ReportClientDocument.new(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.b9.onDataSourceChanged(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.a(Unknown Source)
at com.crystaldecisions.sdk.occa.report.application.DatabaseController.setDataSource(Unknown Source)
at org.apache.jsp.No_005f1.Eclipse_005fJTDS_005fSQL2005_005fTable_002dviewer_jsp._jspService(Eclipse_005fJTDS_005fSQL2005_005fTable_002dviewer_jsp.java:106)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
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:191)
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:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: com.crystaldecisions.reports.common.QueryEngineException: u7121u6CD5u9810u671Fu7684u8CC7u6599u5EABu9023u7DDAu5668u932Fu8AA4
at com.crystaldecisions.reports.queryengine.Connection.bf(Unknown Source)
at com.crystaldecisions.reports.queryengine.Rowset.z3(Unknown Source)
at com.crystaldecisions.reports.queryengine.Rowset.bL(Unknown Source)
at com.crystaldecisions.reports.queryengine.Rowset.zM(Unknown Source)
at com.crystaldecisions.reports.queryengine.Connection.a(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.a(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.if(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.try(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.a(Unknown Source)
at com.crystaldecisions.reports.queryengine.Table.u7(Unknown Source)
at com.crystaldecisions.reports.datafoundation.DataFoundation.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.dfadapter.DFAdapter.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.dfadapter.CheckDatabaseHelper.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.datafoundation.CheckDatabaseCommand.new(Unknown Source)
at com.crystaldecisions.reports.common.CommandManager.a(Unknown Source)
at com.crystaldecisions.reports.common.Document.a(Unknown Source)
at com.crystaldecisions.reports.dataengine.VerifyDatabaseCommand.new(Unknown Source)
at com.crystaldecisions.reports.common.CommandManager.a(Unknown Source)
at com.crystaldecisions.reports.common.Document.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.f.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.a(Unknown Source)
at com.businessobjects.reports.sdk.requesthandler.DatabaseRequestHandler.if(Unknown Source)
at com.businessobjects.reports.sdk.JRCCommunicationAdapter.do(Unknown Source)
... 39 more
Please help me and tell me why.... -
Performance Problems on Faces Navigation Diagram and Hyperthreading query
Am I the only one having performance problems when dealing with Faces-Config Diagrams of about 35 JSPs displayed on the sheet. using Jdev 10.1.3 It's taking my workstation about a full minute and a half to update the name of an arrow. The most stressed component during this task seems to be the CPU.
And just another question has anybody investigated how is the performance of Jdev affected by either enabling or disabling hyperthreading? In my case my CPU usage manages to reach only 50%. I'm tempted to switch HT off to let JDev use all the cpu power. if that would be the case.Hello Diego,
you mentioned that you compared a BEx Query with the Web INtelligence report. Could you provide more details here ?
- what are the elements in the rows, columns and free characterisitcs in the BEx Query ?
- was the query execute as designed in the BEx Query Designer with BEx Web Reporting ?
- what are the elements in the WebIntelligence Query panel ?
thanks
Ingo -
Performance problem when running a personalization rule
We have a serious performance problem when running a personalization rule.
The rule is defined like this:
Definition
Rule Type: Content
Content Type: LoadedData
Name: allAnnouncements
Description: all announcements of types: announcement, deal, new release,
tip of the day
If the user has the following characteristics:
And when:
Then display content based on:
(CONTENT.RessourceType == announcement) or (CONTENT.RessourceType == deal)
or (CONTENT.RessourceType == new release) or (CONTENT.RessourceType == tip
of the week)
and CONTENT.endDate > now
and CONTENT.startDate <= now
END---------------------------------
and is invoked in a JSP page like this:
<%String customQuery = "(CONTENT.language='en') && (CONTENT.Country='nl'
|| CONTENT.Country='*' ) && (!(CONTENT.excludeIds like '*#7#*')) &&
(CONTENT.userType ='retailer')"%>
<pz:contentselector
id="cdocs"
ruleSet="jdbc://com.beasys.commerce.axiom.reasoning.rules.RuleSheetDefinitio
nHome/b2boost"
rule="allAnnouncements"
sortBy="startDate DESC"
query="<%=customQuery%>"
contentHome="<%=ContentHelper.DEF_DOCUMENT_MANAGER_HOME%>" />
The customQuery is constructed at runtime from user information, and cannot
be constructed with rules
administration interface.
When I turn on debugging mode, I can see that the rule is parsed and a SQL
query is generated, with the correct parameters.
This is the generated query (with the substitutions):
select
WLCS_DOCUMENT.ID,
WLCS_DOCUMENT.DOCUMENT_SIZE,
WLCS_DOCUMENT.VERSION,
WLCS_DOCUMENT.AUTHOR,
WLCS_DOCUMENT.CREATION_DATE,
WLCS_DOCUMENT.LOCKED_BY,
WLCS_DOCUMENT.MODIFIED_DATE,
WLCS_DOCUMENT.MODIFIED_BY,
WLCS_DOCUMENT.DESCRIPTION,
WLCS_DOCUMENT.COMMENTS,
WLCS_DOCUMENT.MIME_TYPE
FROM
WLCS_DOCUMENT
WHERE
((((WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'announcement'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'deal'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'new release'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = ''
AND WLCS_DOCUMENT_METADATA.VALUE = 'tip of the week'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'press release'
AND (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'endDate'
AND WLCS_DOCUMENT_METADATA.VALUE > '2001-10-22 15:53:14.768'
AND (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'startDate'
AND WLCS_DOCUMENT_METADATA.VALUE <= '2001-10-22 15:53:14.768'
AND ((WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'language'
AND WLCS_DOCUMENT_METADATA.VALUE = 'en'
AND ((WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'Country'
AND WLCS_DOCUMENT_METADATA.VALUE = 'nl'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'Country'
AND WLCS_DOCUMENT_METADATA.VALUE = '*'
AND NOT (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'excludeIds'
AND WLCS_DOCUMENT_METADATA.VALUE LIKE '%#7#%' ESCAPE '\'
AND (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'userType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'retailer'
At this moment, the server makes the user wait more than 10 min for the
query to execute.
This is what I found out about the problem:
1)When I run the query on an Oracle SQL client (We are using Oracle 8.1.7.0)
, it takes 5-10 seconds.
2)If I remove the second term of (CONTENT.Country='nl' ||
CONTENT.Country='*' ) in the custom query,
thus retricting to CONTENT.Country='nl', the performance is OK.
3)There are currently more or less 130 records in the DB that have
Country='*'
4)When I run the page on our QA server (solaris), which is at the same time
our Oracle server,
the response time is OK, but if I run it on our development server (W2K),
response time is ridiculously long.
5)The problem happens also if I add the term (CONTENT.Country='nl' ||
CONTENT.Country='*' )
to the rule definition, and I remove this part from the custom query.
Am I missing something? Am I using the personalization server correctly?
Is this performance difference between QA and DEV due to differences in the
OS?
Thank you,
Luis MuñizLuis,
I think you are working through Support on this one, so hopefully you are in good
shape.
For others who are seeing this same performance issue with the reference CM implementation,
there is a patch available via Support for the 3.2 and 3.5 releases that solves
this problem.
This issue is being tracked internally as CR060645 for WLPS 3.2 and CR055594 for
WLPS 3.5.
Regards,
PJL
"Luis Muniz" <[email protected]> wrote:
We have a serious performance problem when running a personalization
rule.
The rule is defined like this:
Definition
Rule Type: Content
Content Type: LoadedData
Name: allAnnouncements
Description: all announcements of types: announcement, deal, new release,
tip of the day
If the user has the following characteristics:
And when:
Then display content based on:
(CONTENT.RessourceType == announcement) or (CONTENT.RessourceType ==
deal)
or (CONTENT.RessourceType == new release) or (CONTENT.RessourceType ==
tip
of the week)
and CONTENT.endDate > now
and CONTENT.startDate <= now
END---------------------------------
and is invoked in a JSP page like this:
<%String customQuery = "(CONTENT.language='en') && (CONTENT.Country='nl'
|| CONTENT.Country='*' ) && (!(CONTENT.excludeIds like '*#7#*')) &&
(CONTENT.userType ='retailer')"%>
<pz:contentselector
id="cdocs"
ruleSet="jdbc://com.beasys.commerce.axiom.reasoning.rules.RuleSheetDefinitio
nHome/b2boost"
rule="allAnnouncements"
sortBy="startDate DESC"
query="<%=customQuery%>"
contentHome="<%=ContentHelper.DEF_DOCUMENT_MANAGER_HOME%>" />
The customQuery is constructed at runtime from user information, and
cannot
be constructed with rules
administration interface.
When I turn on debugging mode, I can see that the rule is parsed and
a SQL
query is generated, with the correct parameters.
This is the generated query (with the substitutions):
select
WLCS_DOCUMENT.ID,
WLCS_DOCUMENT.DOCUMENT_SIZE,
WLCS_DOCUMENT.VERSION,
WLCS_DOCUMENT.AUTHOR,
WLCS_DOCUMENT.CREATION_DATE,
WLCS_DOCUMENT.LOCKED_BY,
WLCS_DOCUMENT.MODIFIED_DATE,
WLCS_DOCUMENT.MODIFIED_BY,
WLCS_DOCUMENT.DESCRIPTION,
WLCS_DOCUMENT.COMMENTS,
WLCS_DOCUMENT.MIME_TYPE
FROM
WLCS_DOCUMENT
WHERE
((((WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'announcement'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'deal'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'new release'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = ''
AND WLCS_DOCUMENT_METADATA.VALUE = 'tip of the week'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'RessourceType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'press release'
AND (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'endDate'
AND WLCS_DOCUMENT_METADATA.VALUE > '2001-10-22 15:53:14.768'
AND (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'startDate'
AND WLCS_DOCUMENT_METADATA.VALUE <= '2001-10-22 15:53:14.768'
AND ((WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'language'
AND WLCS_DOCUMENT_METADATA.VALUE = 'en'
AND ((WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'Country'
AND WLCS_DOCUMENT_METADATA.VALUE = 'nl'
)) OR (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'Country'
AND WLCS_DOCUMENT_METADATA.VALUE = '*'
AND NOT (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'excludeIds'
AND WLCS_DOCUMENT_METADATA.VALUE LIKE '%#7#%' ESCAPE '\'
AND (WLCS_DOCUMENT.ID IN (
SELECT
WLCS_DOCUMENT_METADATA.ID
FROM
WLCS_DOCUMENT_METADATA
WHERE
WLCS_DOCUMENT_METADATA.ID = WLCS_DOCUMENT.ID
AND WLCS_DOCUMENT_METADATA.NAME = 'userType'
AND WLCS_DOCUMENT_METADATA.VALUE = 'retailer'
At this moment, the server makes the user wait more than 10 min for the
query to execute.
This is what I found out about the problem:
1)When I run the query on an Oracle SQL client (We are using Oracle 8.1.7.0)
, it takes 5-10 seconds.
2)If I remove the second term of (CONTENT.Country='nl' ||
CONTENT.Country='*' ) in the custom query,
thus retricting to CONTENT.Country='nl', the performance is OK.
3)There are currently more or less 130 records in the DB that have
Country='*'
4)When I run the page on our QA server (solaris), which is at the same
time
our Oracle server,
the response time is OK, but if I run it on our development server (W2K),
response time is ridiculously long.
5)The problem happens also if I add the term (CONTENT.Country='nl' ||
CONTENT.Country='*' )
to the rule definition, and I remove this part from the custom query.
Am I missing something? Am I using the personalization server correctly?
Is this performance difference between QA and DEV due to differences
in the
OS?
Thank you,
Luis Muñiz -
Problem: JSP, MySQL, UTF-8
Hello!
I use Netbeans 6.5, MySQL 5.0.67, Apache Tomcat 6.0.18, MySQL Connector J 5.1.6 to write simple web database application in JSP. Now I have problem with encoding of non-latin character strings returned from database.
Database was created by query:
CREATE DATABASE mydb DEFAULT CHARACTER SET = utf8Resource was defined in context.xml as follows:
<Resource name="jdbc/ipdbDatasource"
auth="Container"
type="javax.sql.DataSource"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/ipdb_10?autoReconnect=true&characterSetResults=UTF-8"
username="root"
password=""
maxActive="100"
maxIdle="30"
maxWait="10000"/>Test page source is:
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<sql:query var="rooms" dataSource="jdbc/ipdbDatasource" >
SELECT address, descr FROM room
</sql:query>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>JSP Page</title>
</head>
<body>
<h1>Тестовая страница</h1>
<c:forEach var="room" items="${rooms.rows}">
<p>${room.address}</p>
</c:forEach>
</body>
</html>Page header <h1> content is OK, but ${room.address} appears in wrong encoding. What can cause this problem?I would suggest that you start by looking a jdbc only. JSP is not JDBC. XML is not JDBC.
Moreover the ONLY way to determine what is actually being extracted from the database in a text value is to print the characters as integers. If you attempt to display them using ANYTHING (System.out, swing, xml, file io) then they will be mapped. And mapped data is not the same as what you got from the database. -
Out.print performance problems?
Hi
I'm facing strange performance problems I would not expect generating long html pages on the fly.
I have a page that is approximately 30 to 40Kb long. Profiling code generation I obtain a 30 second time to process. I have excluded every server-side processing activity since I have also used a StringBuffer to accumulate all the html code to be flushed: generating the StringBuffer content require less than 1ms... flushing out the content with:
out.print(stb);
out.flush()
is taking 5 to 6 seconds. The same happens both on a development environment using CQ servlet engine, both in production where we are using CQ with JBoss as app server.
I tried the same operation on a simple tomcat installation with a JSP... less than 10 ms to generate the full page.
This problem is slowing down a lot performances.
The contents are generated inside a nested component included with a <cq:include> tag.
Anyone can give me suggestions on how to cut down a so big delay in html content generation?
thanksI made further analysis and now I can give a clearer scenario.
The *very low* performances has been registered on CQ 5.2.1 when generating html code full of relative links. Every link *cost* big processing time. With 60-70 links the component ends up paying 3 to 4 seconds (too much!).
The same component on a CQ 5.4 instance takes approximately 500 milliseconds, still too much considering that without link the same html code is generated in less than 10 milliseconds.
The reason is clearly in the filters applied in the output pipeline --> link checker? remapping on links based on etc/map configurations?
How can I change configurations in order to avoid these performance problems?
thanks
Ignazio -
Performance problem with CR SDK
Hi,
I'am currently on a customer site and I have the following problem :
The client have a performance problem with a J2EE application wich call a Crystal report with th CR SDK. To reproduce the problem on the local machine (the CR server), I have developped a little jsp page wich used the Crystal SDK to open a Crystal report on the server (this report is based on a XML data source), setting the new data source (with a new xml data flow) and refresh the report in PDF format.
The problem is that the 2 first sequences take about 5 seconde each (5 sec for the opening report and 5 seconds for the setting data source). Then the total process take about 15 seconds to open and refresh the document that is very long for a little document.
The document is a 600Ko file, the xml source is a 80Ko file.
My jsp page is directly deployed on the tomcat of the Crystal Report Server (CRXIR2 without Service Pack).
The Filestore and the MySQL database are on the CR server.
The server is a 4 quadripro (16 proc) with 16Go of RAM and is totally dedicated to Crystal Report. For the moment, there is no activity on the server (it is also used for the test).
The mains jsp orders are the followings :
IEnterpriseSession es = CrystalEnterprise.getSessionMgr().logon("administrator", "", "EDITBI:6400", "secEnterprise");
IInfoStore infoStore = (IInfoStore) es.getService("", "InfoStore");
IInfoObjects infoObjects = infoStore.query("SELECT * FROM CI_INFOOBJECTS WHERE SI_NAME='CPA_EV' AND SI_INSTANCE=0 ");
IInfoObject report = (IInfoObject) infoObjects.get(0);
IReportAppFactory reportAppFactory = (IReportAppFactory)es.getService("RASReportFactory");
ReportClientDocument reportClientDoc = reportAppFactory.openDocument(report.getID(), 0, null);
IXMLDataSet xmlDataSet = new XMLDataSet();
xmlDataSet.setXMLData(new ByteArray(ligne_data_xml));
xmlDataSet.setXMLSchema(new ByteArray(ligne_schema_xml));
DatabaseController db = reportClientDoc.getDatabaseController();
db.setDataSource(xmlDataSet, "", "");
ByteArrayInputStream bt = (ByteArrayInputStream)reportClientDoc.getPrintOutputController().export(ReportExportFormat.PDF);
My question is : does this method is the good one to do this ?
Thank's in advance for your help
Best regards
EmmanuelHi,
My problem is not resolved and I have'nt news from the support.
If you have any idea/info, don't forget me
Thank's in advance
Emmanuel -
Problem using JSTL XML tags.
My xml tag is giving problems. All other tags (core/sql and EL) are working fine. Even a very simple code like :
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!-- parse an XML document -->
<x:parse var="simple">
<a>
<b>
<c>C </c>
</b>
<d>
<e> E </e>
</d>
</a>
</x:parse>
<!-- display using XPath expressions -->
<x:out select="$simple//e"/>
gives error as :
javax.servlet.ServletException: Cannot inherit from final class
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:867)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:800)
org.apache.jsp.jsp.xml.first_jsp._jspService(first_jsp.java:65)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
Pls. help!Works with no problems for me. (same exact code posted into a JSP)
Running on Tomcat 5, Java1.4
What server are you running, and version of java?
Is there anything else on the page? Are you extending a class somehow?
Do you have any extra libraries in the web-inf/lib directory that might be conflicting? -
Jdev 10.1.2 problem define jstl tagLib
hi,
i have a problem in my jsp when i compile it with JDev 10.1.2, when trying to use JSTL tag:
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
I always get the following message:
Error(3,49): Attribute 'xmlns' used but not declared.
Error(4,58): Attribute 'xmlns:xsi' used but not declared.
Error(5,105): Attribute 'xsi:schemaLocation' used but not declared.
Error(6,18): Attribute 'version' used but not declared.
Error(33,19): Invalid element 'context-param' in content of 'web-app', expected elements '[resource-ref, security-constraint, login-config, security-role, env-entry, ejb-ref, ejb-local-ref]'.
Error(34,18): Invalid element 'description' in content of 'context-param', expected elements '[param-name]'.
but i saw this tutorial http://www.oracle.com/technology/products/jdev/tips/schalk/taglibs/taglibs.html
and i check my preferences about my projet, i had the libraries standart.jar and jstl.jar to my project (Project Properties->Profile->developement->Libraries), and they are located in my <project>/public_html/WEB-INF/lib/
And for the declaration of the taglib,
Tools->Manage Libraries-> JSP TagLibraries the prefix "c" is defined, and it is the same uri what i'm using in my jsp.
I make another with jdev 10.1.3, and i put my project, i compile and it work very fine.
Thanks for any help.
Regis.Hi this is my Web.xml
I do not have a DTD with the web.xml
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<display-name>jGallery</display-name>
<context-param>
<param-name>useDataBase</param-name>
<param-value>false</param-value>
</context-param>
<context-param>
<param-name>dataSource</param-name>
<param-value>java:comp/env/jdbc/jGallery</param-value>
</context-param>
<context-param>
<param-name>thumbnailWriter</param-name>
<param-value>de.jwi.jgallery.toolkit.ToolkitThumbnailWriter</param-value>
</context-param>
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/jGallery</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<context-param>
<description>separate with commas</description>
<param-name>dirmappings</param-name>
<param-value>/=D:/temp/jg</param-value>
</context-param>
<servlet>
<servlet-name>Controller</servlet-name>
<servlet-class>de.jwi.jgallery.servlets.Controller</servlet-class>
<init-param>
<description>Path prefix, that maps to web ressources</description>
<param-name>webprefix</param-name>
<param-value>/web/</param-value>
</init-param>
</servlet>
<servlet>
<servlet-name>StatisticsController</servlet-name>
<servlet-class>de.jwi.jgallery.servlets.StatisticsController</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Controller</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>StatisticsController</servlet-name>
<url-pattern>/Statistics/*</url-pattern>
</servlet-mapping>
<!--
<security-constraint>
<web-resource-collection>
<web-resource-name>jGallery</web-resource-name>
<url-pattern>/Statistics</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>manager</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>FORM</auth-method>
<realm-name>Example Form-Based Authentication Area</realm-name>
<form-login-config>
<form-login-page>/security/login.jsp</form-login-page>
<form-error-page>/security/error.jsp</form-error-page>
</form-login-config>
</login-config>
<security-role>
<role-name>manager</role-name>
</security-role>
-->
<welcome-file-list>
<welcome-file>jGallery.htm</welcome-file>
</welcome-file-list>
<jsp-config>
<taglib>
<taglib-uri> http://www.jwi.de/jGallery/taglib </taglib-uri>
<taglib-location> /WEB-INF/jGallery.tld </taglib-location>
</taglib>
</jsp-config>
</web-app>
I'm not using the JSTL 1.1, in the "management libraries"
i define a JSTL librarie and the version is 1.0. -
I am trying to have JSP pages parse and read an XML file and then return some data in an HTML table. I'm using the JSTL libraries and have a basic understanding of them, but I apparently need help.
My first page just gets the value and passes it to the second page. The second page handles all of the processing. Here is my JSP page:
<%@page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<%@include file="index.jsp" %>
<% String clientID = request.getParameter("enteredID"); %>
<c:import url="npiXMLTest5.xml" var="doc" />
<x:parse varDom="dom" doc="${doc}"/>
<x:set var="srcCID" select="string($dom/npiNumbers/client/clientNum)" />
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NPI XJTL Test</title></head>
<body>
<c:set var="CID" value="<%= clientID %>" />
<h2>NPI XJTL Test Page</h2>
<table border="1">
<tr><th>NPI Number</th><th>Description</th></tr>
<c:choose>
<c:when test="${CID}=${srcCID}">
<x:forEach select="$dom/npiNumbers/client/npiNum" var="$n">
<tr><td><x:out select="$n/npi" /></td><td><x:out select="$n/desc" /></td></tr>
</x:forEach>
</c:when>
<c:otherwise>
There is an error with your coding
</c:otherwise>
</c:choose>
</table></body></html>My XML structure is as follows:
<npiNumbers xsi:schemaLocation="http://localhost/namespace NPI_XSD5.xsd" xmlns="http://localhost/namespace" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<client>
<clientNum/>
<clientName/>
<npiNum>
<npi/>
<desc/>
</npiNum>
</client>
</npiNumbers>I am trying to return the results of the <npiNum> element (which can have multiple values) - <npi> and <desc> - in a table based on the <clientNum> element. I try to evaluate the page variable with the xml element. If it matches, I will return a table. A client can have multiple <npiNum> elements, so the construction of the table is in the x:forEach loop.
I think my problem is getting the variable from JSP to compare against the <clientNum> element in the XML file.
Any ideas?I think your problem is less JSP/JSTL and more querying the XML.
You are trying to "select all <npinum> elements from a client based on clientnum"
I am far from an expert on XPath, but I think the following query is what you are after: "/npinumbers/client[clientNum=????]/npiNum"
To do that with JSTL you would replace ???? with $param:enteredId or $CID (equivalent in your example)
Here is the resulting JSP page.
<%@page contentType="text/html" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>
<c:import url="npiXMLTest5.xml" var="doc" />
<x:parse varDom="dom" doc="${doc}"/>
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>NPI XJTL Test</title></head>
<body>
<c:set var="CID" value="${param.enteredId}" />
<h2>NPI XJTL Test Page</h2>
<table border="1">
<tr><th>NPI Number</th><th>Description</th></tr>
<x:forEach select="$dom/npiNumbers/client[clientNum=$CID]/npiNum" var="n">
<tr><td><x:out select="npi" /></td><td><x:out select="desc" /></td></tr>
</x:forEach>
</table>
<hr>
<form>
<input type="text" name="enteredId"/>
<input type="submit">
</form>
</body></html>I made up the following test file to use with it. I don't know if it was exactly what your requirements are, but it was a best guess based on your info.
<npiNumbers>
<client>
<clientNum>42</clientNum>
<clientName>Ford Prefect</clientName>
<npiNum>
<npi>123</npi>
<desc>life</desc>
</npiNum>
<npiNum>
<npi>234</npi>
<desc>universe</desc>
</npiNum>
<npiNum>
<npi>456</npi>
<desc>everything</desc>
</npiNum>
</client>
<client>
<clientNum>666</clientNum>
<clientName>Satan</clientName>
<npiNum>
<npi>333</npi>
<desc>Baby Devil</desc>
</npiNum>
</client>
</npiNumbers>Cheers,
evnafets -
Simple setup problems with JSTL and Tomcat
Hi all, I'm having some problems getting JSTL to work the 1st time. JSTL setup seems to be a common problem for relative newbies, but having read previous threads, I still haven't been able to solve my problem so hopefully someone can help:
the jstl.jar and standard.jar are in my WEB-INF/lib directory, so I don't think it's a classpath problem.
My jsp page has the following at the top:
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>Later, I reference a bean var with :
<c:out value="My var is : ${var.property}"/>In my web.xml I have:
<taglib>
<taglib-uri>http://java.sun.com/jstl/core</taglib-uri>
<taglib-location>/WEB-INF/lib/jstl.jar</taglib-location>
</taglib>And I've placed the actual tld (c.tld) in the WEB-INF directory.
On startup I get the error when compiling the JSP:
No such tag out in the tag library imported with prefix c
Can anyone help here?
Thanks in advance,
MikeI think this note from the JSTL mailing list by Shawn Bayern, one of the lead developers of Jakarta JSTL and the author of "JSTL In Action", will clarify it:
http://www.mail-archive.com/[email protected]/msg04587.html
Don't put that <taglib> in your web.xml. All the books tell you to do it, but Shawn Bayern has the right answer. The URI should be the one that's in the TLD JAR .tld files.
I use JSTL and Tomcat 4.1.24 without the <taglib>, and it works fine. - MOD -
Hi,
We are using JDeveloper 10.1.3.0.4(SU5) on windows for development of ADF application. We need to deploy the developed application onto Oracle Application Server 10g (10.1.3) which is running on Solaris. We are using BC4J, WAR and EAR deployment profiles in jdeveloper to create the .war and .ear files.
If I deploy the generated ear on a standalone OC4J server install on my windows PC, it works fine.
Now when I deploy the generated .ear file onto the Oracle Application Server 10.1.3 through Application Server Control interface and then try to access the jspx pages under our application we are getting following error:
oracle.classloader.util.AnnotatedNoClassDefFoundError: Missing class: javax.servlet.jsp.jstl.core.Config Dependent class: com.sun.faces.application.ViewHandlerImpl Loader: accaweb.web.accaweb:0.0.0 Code-Source: /oracle/app/oracle/product/10gas3/j2ee/home/applications/accaweb/accaweb/WEB-INF/lib/jsf-impl.jar Configuration: WEB-INF/lib/ directory in /oracle/app/oracle/product/10gas3/j2ee/home/applications/accaweb/accaweb/WEB-INF/libThe missing class is available from the following locations: 1. Code-Source: /oracle/app/oracle/product/10gas3/j2ee/home/default-web-app/WEB-INF/lib/jstl.jar (from WEB-INF/lib/ directory in /oracle/app/oracle/product/10gas3/j2ee/home/default-web-app/WEB-INF/lib) This code-source is available in loader default.web.defaultWebApp:0.0.0. at oracle.classloader.PolicyClassLoader.handleClassNotFound (PolicyClassLoader.java:2051) [oracle/app/oracle/product/10gas3/j2ee/home/lib/pcl.jar (from system property java.class.path), by sun.misc.Launcher$AppClassLoader@1482257]
I have confirmed that the .war file inside the .ear file does contain the jstl.jar file under WEB-INF/lib folder. And the jar file does contain the class 'javax.servlet.jsp.jstl.core.Config'
As a workaround, I found that if I copy the jstl.jar file from default-web-app to my application web-inf/lib folder, things start to work fine. ie copy from: '/oracle/app/oracle/product/10gas3/j2ee/home/default-web-app/WEB-INF/lib/jstl.jar'
to: '/oracle/app/oracle/product/10gas3/j2ee/home/applications/accaweb/accaweb/WEB-INF/lib/'
– or –
Another workaround is to add the '/oracle/app/oracle/product/10gas3/j2ee/home/default-web-app/WEB-INF/lib/jstl.jar' file in the classpath for my web application through Application Server Control setting page.
Now both of these workaround needs us to perform additional post deployment steps which should really not be required since the jar files is included in the project.
Has anyone faced this issue? Any pointers in this respect will be a great help.
regards - rutwikSurprise Surprise !
I just tried deploying the file via uploading it from the Application Server Control UI and it worked fine.
Till now, I was ftp'ing the ear file from my PC to the server on which Oracle AS is running and was telling Application Server Control to pick form that uploaded location.
I am still not clear on why it works with HTTP upload and not via the FTP upload?
cheers - rutwik -
Hi,
We have developed a e-commerce application using weblogic 4.5.1. We use
jdk1.2.2 and have installed service pack 7.
We use a progress database with a jdbc driver provided by Merant.
This jdbc driver doesn't support connection pooling so we get the connection
each time we need it.
We developed some servlets and jsp pages, also compiled using jdk1.2.2.
The problem we have is that there is one query that when we execute it,
results in a time out error after 3 minutes. The keepalivesecs are set to
more than 6000 secs. It is according to me not a problem of neither the
database nor the jdbc driver, since I tested the same code without using
weblogic and the servlet. Then the query performs fine. After 10 secs I get
the disered result.(run on a client machine).
I have looked at the performance tuning document but there is not much
information about how to handle this. Even if there is only 1 (one) user
connected performance is terrible.
Kind regards,
PatrickHi,
We have a similiar setup and also have performance problems.
We are using Weblogic 4.5.1 towards a Sybase database.
We are using JSP (pages) and it doesn't seem to be the actual
application that needs tuning(?). It more looks like it is some
weserver/application server setup somewhere.
The site is at http://www.awardit.se (it's in swedish though).
Any ideas/solutions?
Best Regards
Kenneth Ljunggren
"Patrick Vanbrabant" <[email protected]> skrev i meddelandet
news:8a8kmb$jso$[email protected]..
Hi,
We have developed a e-commerce application using weblogic 4.5.1. We use
jdk1.2.2 and have installed service pack 7.
We use a progress database with a jdbc driver provided by Merant.
This jdbc driver doesn't support connection pooling so we get theconnection
each time we need it.
We developed some servlets and jsp pages, also compiled using jdk1.2.2.
The problem we have is that there is one query that when we execute it,
results in a time out error after 3 minutes. The keepalivesecs are set to
more than 6000 secs. It is according to me not a problem of neither the
database nor the jdbc driver, since I tested the same code without using
weblogic and the servlet. Then the query performs fine. After 10 secs Iget
the disered result.(run on a client machine).
I have looked at the performance tuning document but there is not much
information about how to handle this. Even if there is only 1 (one) user
connected performance is terrible.
Kind regards,
Patrick -
JSP, JSTL and XML Exception
Hi,
I'm using tomcat 5.0.28 with J2SE5, JSP and JSTL. I tried to execute the following example about JSTL and XML.
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jstl/xml" prefix="x" %>
<c:import url="book.xml" var="url" />
<x:parse xml="${url}" var="book" scope="session" />
<x:choose>
</x:choose>
<P>
<B><x:out select="$book/book/title"/></B><BR>
<x:out select="$book/book/author"/><BR>
<x:out select="$book/book/url"/><BR>When I execute the jsp file, the container produces following exception:
javax.servlet.ServletException: org/apache/xpath/XPathException
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:825)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758)
org.apache.jsp.xml.xml_005fchoose_jsp._jspService(xml_005fchoose_jsp.java:104)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
root cause
java.lang.NoClassDefFoundError: org/apache/xpath/XPathException
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1634)
org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:860)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1307)
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
org.apache.taglibs.standard.tag.common.xml.WhenTag.condition(WhenTag.java:51)
org.apache.taglibs.standard.tag.common.core.WhenTagSupport.doStartTag(WhenTagSupport.java:65)
org.apache.jsp.xml.xml_005fchoose_jsp._jspx_meth_x_when_0(xml_005fchoose_jsp.java:203)
org.apache.jsp.xml.xml_005fchoose_jsp._jspx_meth_x_choose_0(xml_005fchoose_jsp.java:169)
org.apache.jsp.xml.xml_005fchoose_jsp._jspService(xml_005fchoose_jsp.java:84)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
Due to the fact, that org/apache/xpath/XPathException belongs to xalan, i copied the xalan 2.7.0 to the web-inf/lib directory. But this doesn't solve the problem. I'm tried it also with xalan, xerces and jaxp. Again, it doesn't work.
Can anybody help me with this problem?
byeCouple of things, possibly unrelated, but not sure.
You are using JSTL1.0 uris.
With Tomcat5 you can use JSTL1.1, and the Servlet2.4 spec.
You would use the URI: <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
and also update your web.xml file to declare itself as version 2.4
You shouldn't need any of the xalan xerces or jaxp classes in web-inf/lib.
xerces is by default found in the [TOMCAT]/common/endorsed directory.
The others should be provided with the standard java API.
I would try with minimal jar files in web-inf/lib
Occasionally if you include files twice in the classpath it will create ClassNotFoundExceptions like this.
Hope this helps,
evnafets
Maybe you are looking for
-
Error while Transporting changes in Process chain
Hi All, I have added a Hierarchy InfoPackage in Process chain and added this InfoObject in Save hierarchy and Attribute change Run Process types. My transport Request is showing only three entries each for save hierarchy , attribute change run and on
-
How to update child record when item from parent record changes
Hi, I have a master and detail form with two regions on the same page. Region one references parent record, one of column in the parent record is also in the child record. And is one to many relation between parent record and child record. How can I
-
Error message when opening a new window.
Whenever I open a new window beside the initial one (by link or otherwise), I get this message: Exception in LoadPrefs: TypeError: gBrowser.browsers[i] is undefined The page appear, but it seems to have the default display (without my preferences or
-
Need help with updates and new apple programs
something happened to my pc. having problems with my pc when it restarts. wondered if anyone whichapple updates require a restart, and which don't? if they require a restart to finish installation, they fail, and my pc crashes, and i have to resintal
-
Out of the blue, my ITouch is unable to access my wireless network ONLY when my PC is on (the PC is connected via Ethernet cable, and has no wireless capabilities that I know of). What gives? When the PC is turned off, everything is totally fine.