h:outputLink with context path?
Hey,
give it anyway to set an flag in the <h:outputLink> tag to copy the context path automatic on the beginning of the value from outputLink or must I write my own component?
No flag like that... I'm not actually sure what the problem is here though. It definitely sounds like you don't need a custom component though!
What's wrong with just binding the value attribute to your backing bean, and let the bean figure out what your context root is?
CowKing
Similar Messages
-
Hi everyone,
I have the following issue. After changing the context path, via felix console, I can not checkout the content via vlt. Before that, I could checkout without any problems.
I am using CQ5.5, CRX2.3, context path: /Test
That is what I am trying:
vlt -v --credentials admin:admin co http://localhost:23310/Test/server/crx.default
Connecting via JCR remoting to http://localhost:23310/Test/server
[WARN ] Authentication required to access repository descriptors
[ERROR] checkout: com.day.jcr.vault.vlt.VltException: Unable to mount filesystem
caused by: javax.jcr.ItemNotFoundException: Not Found
caused by: org.apache.jackrabbit.webdav.DavException: Not Found
Other versions I tried:
vlt -v --credentials admin:admin co http://localhost:23310/crx
vlt --credentials admin:admin co http://localhost:23310/Test/server
vlt --credentials admin:admin co http://localhost:23310/Test
vlt --credentials admin:admin co http://localhost:23310/Test/crx
To verify if I could connect to the instance properly I started CRXDE
and try to connect to "http://localhost:23310/Test"
After click the ok button I got that error:
No file system is defined for scheme: jcr
Part of the .log file (.crxde):
eclipse.buildId=unknown
java.version=1.6.0_37
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_DE
Framework arguments: -keyring /Users/peterwimsey/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/peterwimsey/.eclipse_keyr
ing -showlocation
!ENTRY org.eclipse.core.resources 2 10035 2012-11-25 19:01:19.268
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to
recover changes.
!ENTRY org.eclipse.osgi 4 0 2012-11-25 19:04:14.363
!MESSAGE Application error
!STACK 1
java.lang.reflect.InvocationTargetException
at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121)
at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau
ncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav
a:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr
at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)
at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)
at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65)
at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107)
at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350)
at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100)
at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6)
Any tips or hints are welcome.
In the case you need more information, just leave a note.
Thanks in advance for your help.
Best regards,
PeterThe VLT works fine with the above URL change but How to fix "CRXDE" Initialization error if a context path is defined?
I have a context path defined /Test and when I am trying to login to CRXDE with URL as http://localhost:4502/Test, I am getting below Initialization Error.
Any workaround as Which URL should work while logging to repository (with context path) using CRXDE 1.0.1
eclipse.buildId=unknown java.version=1.6.0_06 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY org.eclipse.osgi 4 0 2013-04-25 17:50:23.802 !MESSAGE Application error !STACK 1 java.lang.reflect.InvocationTargetException at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121) at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) 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 org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr
at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55) at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65) at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107) at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350) at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100) at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6) at com.day.cq.ide.init.SetupWorkspaceOperation.execute(SetupWorkspaceOperation.java:119) at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800) at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118) ... 13 more Root exception:
Thanks. -
Get the context path with jspx
How can I get the context path using jspx?
with jsp I get using scriptlet
<%=request.getContextPath()%>but it didn't validate with xhtml
thanksI'm really unfamiliar with JSP Documents and I don't know if nesting the tags would be valid. Why don't you use EL in that case?
${pageContext.request.contextPath} will print out the value you need.
P.S. In case it just prints out as is without being evaluated, take a look at these:
http://faq.javaranch.com/java/ElOrJstlNotWorkingAsExpected
http://faq.javaranch.com/java/JstlTagLibDefinitions
http://faq.javaranch.com/java/SetupJstlForJsp2
http://faq.javaranch.com/java/ServletsWebXml
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
(Yes I know it's on JavaRanch but I think it applies everywhere)
---------------------------------------------------------------- -
Problem with absolute path and context using Tomcat 4
I added the following line to my server.xml:
<Context path="/track" docBase="track" />Now I have used absolute paths(ex: /includes/css/style.css) throughout my code and it worked when I served my application from the ROOT context but when I moved it to the /track - the paths did not include the new root context.
So instead of looking at http://localhost/track/includes/css/style.css it still looks at http://localhost/includes/css/style.css.
Is there any kind of setting I am missing in the web.xml or server.xml? I really would like to be able to use absolute paths relative to the context root.
Please help! Thanks in advance.
-ChrisHi,
I am not sure what exactly you are asking but here is my shot. If one tomcat is serving more than one application then the only way for tomcat to know which application to refer is by looking at the context path. Since you have the context path of /track then it should appear in all of your urls being directed to the server (for both servlet and jsp). Since you have used absolute path in all the cases either you will have to change the absolute path or you will have to define them relative (which is a better idea) to a base dir. Hope it helps.
I added the following line to my server.xml:
<Context path="/track" docBase="track"
/>Now I have used absolute paths(ex:
/includes/css/style.css) throughout my code and it
worked when I served my application from the ROOT
context but when I moved it to the /track - the paths
did not include the new root context.
So instead of looking at
http://localhost/track/includes/css/style.css it still
looks at http://localhost/includes/css/style.css.
Is there any kind of setting I am missing in the
web.xml or server.xml? I really would like to be able
to use absolute paths relative to the context root.
Please help! Thanks in advance.
-Chris -
A problem with Package Paths.... i think
Hey im struggling with these errors im getting.
First i should ecplain the layout
this is the directory im working with
public_html>WEB_INF>classes>com
Ok i have 3 java files in here which all compile happily until i try and put them into a package. Once i do this the DbBean,java file complains that it cannot find the other 2 files
This is the error i get when i try to compile it
============================================================
DbBean.java:108: cannot find symbol
symbol : class Product
location: class com.DbBean
public Product getProductDetails(int productId) {
^
DbBean.java:69: cannot find symbol
symbol : class Product
location: class com.DbBean
Product product = new Product();
^
DbBean.java:69: cannot find symbol
symbol : class Product
location: class com.DbBean
Product product = new Product();
^
DbBean.java:93: cannot find symbol
symbol : class Product
location: class com.DbBean
Product product = new Product();
^
DbBean.java:93: cannot find symbol
symbol : class Product
location: class com.DbBean
Product product = new Product();
^
DbBean.java:109: cannot find symbol
symbol : class Product
location: class com.DbBean
Product product = null;
^
DbBean.java:117: cannot find symbol
symbol : class Product
location: class com.DbBean
product = new Product();
^
DbBean.java:149: cannot find symbol
symbol : class ShoppingItem
location: class com.DbBean
ShoppingItem item = (ShoppingItem) enume.nextElement();
^
DbBean.java:149: cannot find symbol
symbol : class ShoppingItem
location: class com.DbBean
ShoppingItem item = (ShoppingItem) enume.nextElement();
^
Note: DbBean.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
==========================================================
The files in the directory are DbBean.java, Product.java and ShoppingItem.java
Here is the code of each file.
package com;
import java.util.Hashtable;
import java.util.ArrayList;
import java.util.Enumeration;
import java.sql.*;
import com.DbBean.*;
//import com.DbBean.Product;
//import com.DbBean.ShoppingItem;
import java.util.*;
public class DbBean {
public String dbUrl = "";
public String dbUserName = "";
public String dbPassword = "";
public void setDbUrl(String url) {
dbUrl = url;
public void setDbUserName(String userName) {
dbUserName = userName;
public void setDbPassword(String password) {
dbPassword = password;
public Hashtable getCategories() {
Hashtable categories = new Hashtable();
try {
Connection connection = DriverManager.getConnection(dbUrl, dbUserName, dbPassword);
Statement s = connection.createStatement();
String sql = "SELECT CategoryId, Category FROM Categories" +
ResultSet rs = s.executeQuery(sql);
while (rs.next()) {
categories.put(rs.getString(1), rs.getString(2) );
rs.close();
s.close();
connection.close();
catch (SQLException e) {}
return categories;
public ArrayList getSearchResults(String keyword) {
ArrayList products = new ArrayList();
try {
Connection connection = DriverManager.getConnection(dbUrl, dbUserName,
dbPassword);
Statement s = connection.createStatement();
String sql = "SELECT ProductId, Name, Description, Price FROM Products" +
" WHERE Name LIKE '%" + keyword.trim() + "%'" +
" OR Description LIKE '%" + keyword.trim() + "%'";
ResultSet rs = s.executeQuery(sql);
while (rs.next()) {
Product product = new Product();
product.id = rs.getInt(1);
product.name = rs.getString(2);
product.description = rs.getString(3);
product.price = rs.getDouble(4);
products.add(product);
rs.close();
s.close();
connection.close();
catch (SQLException e) {}
return products;
public ArrayList getProductsInCategory(String categoryId) {
ArrayList products = new ArrayList();
try {
Connection connection = DriverManager.getConnection(dbUrl, dbUserName, dbPassword);
Statement s = connection.createStatement();
String sql = "SELECT ProductId, Name, Description, Price FROM Products" +
" WHERE CategoryId=" + categoryId;
ResultSet rs = s.executeQuery(sql);
while (rs.next()) {
Product product = new Product();
product.id = rs.getInt(1);
product.name = rs.getString(2);
product.description = rs.getString(3);
product.price = rs.getDouble(4);
products.add(product);
rs.close();
s.close();
connection.close();
catch (SQLException e) {}
return products;
public Product getProductDetails(int productId) {
Product product = null;
try {
Connection connection = DriverManager.getConnection(dbUrl, dbUserName, dbPassword);
Statement s = connection.createStatement();
String sql = "SELECT ProductId, Name, Description, Price FROM Products" +
" WHERE ProductId=" + Integer.toString(productId);
ResultSet rs = s.executeQuery(sql);
if (rs.next()) {
product = new Product();
product.id = rs.getInt(1);
product.name = rs.getString(2);
product.description = rs.getString(3);
product.price = rs.getDouble(4);
rs.close();
s.close();
connection.close();
catch (SQLException e) {}
return product;
public boolean insertOrder(String contactName, String deliveryAddress,
String ccName, String ccNumber, String ccExpiryDate, Hashtable shoppingCart) {
boolean returnValue = false;
long orderId = System.currentTimeMillis();
Connection connection = null;
try {
connection = DriverManager.getConnection(dbUrl, dbUserName, dbPassword);
connection.setAutoCommit(false);
Statement s = connection.createStatement();
String sql = "INSERT INTO Orders" +
" (OrderId, ContactName, DeliveryAddress, CCName, CCNumber, CCExpiryDate)" +
" VALUES" +
" (" + orderId + ",'" + contactName + "','" + deliveryAddress + "'," +
"'" + ccName + "','" + ccNumber + "','" + ccExpiryDate + "')";
s.executeUpdate(sql);
// now insert items into OrderDetails table
Enumeration enume = shoppingCart.elements();
while (enume.hasMoreElements()) {
ShoppingItem item = (ShoppingItem) enume.nextElement();
sql = "INSERT INTO OrderDetails (OrderId, ProductId, Quantity, Price)" +
" VALUES (" + orderId + "," + item.productId + "," +
item.quantity + "," + item.price + ")";
s.executeUpdate(sql);
s.close();
connection.commit();
connection.close();
returnValue = true;
catch (SQLException e) {
try {
connection.rollback();
connection.close();
catch (SQLException se) {}
return returnValue;
package com;
public class Product
public int id;
public String name;
public String description;
public double price;
package com;
public class ShoppingItem
public int productId;
public String name;
public String description;
public double price;
public int quantity;
I'm sure it has something to do with my directory structure, Were using a Tomcat server through Uni so i dont have access to change the context paths or anything like that. Any way to over come this problem would be so much appreciated! if your from Melbourne i'll buy u a beer ;o)
Thanks heaps.
Message was edited by:
SomethingStupidif you start javac in your directory
public_html>WEB_INF>classes>com
the compiler cannot find the the classes Product and ShoppingItem.
Start the compiler in public_html>WEB_INF>classes:
javac com/*.javaThe path
public_html/WEB_INF/classes
is in your case the classpath. javac uses the current working directory as default classpath. The classpath contains "root points" of package directory trees. -
Finding the context path or docBase in a backing bean - Howto
How should I go about finding the context path or docBase in a backing bean?
Is there anyway to get this from glassfish or jsf? GlassFish proudly displayed it on the Application Server > Applications > Web Applications > page. It puts it there with an EL for example:
${com.sun.aas.instanceRoot}/applications/j2ee-modules/jsf-witaCan and/or should I try to use it in a backing bean? i.e. can I rely on it to stay defined?
Or should I make a property which I can set for my backing work?Is this what you want?
FacesContext.getCurrentInstance().getExternalContext().getContext() -
Serial table scan with direct path read compared to db file scattered read
Hi,
The environment
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit
8K block size
db_file_multiblock_read_count is 128
show sga
Total System Global Area 1.6702E+10 bytes
Fixed Size 2219952 bytes
Variable Size 7918846032 bytes
Database Buffers 8724152320 bytes
Redo Buffers 57090048 bytes
16GB of SGA with 8GB of db buffer cache.
-- database is built on Solid State Disks
-- SQL trace and wait events
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true )
-- The underlying table is called tdash. It has 1.7 Million rows based on data in all_objects. NO index
TABLE_NAME Rows Table Size/MB Used/MB Free/MB
TDASH 1,729,204 15,242 15,186 56
TABLE_NAME Allocated blocks Empty blocks Average space/KB Free list blocks
TDASH 1,943,823 7,153 805 0
Objectives
To show that when serial scans are performed on database built on Solid State Disks (SSD) compared to Magnetic disks (HDD), the performance gain is far less compared to random reads with index scans on SSD compared to HDD
Approach
We want to read the first 100 rows of tdash table randomly into buffer, taking account of wait events and wait times generated. The idea is that on SSD the wait times will be better compared to HDD but not that much given the serial nature of table scans.
The code used
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_with_tdash_ssdtester_noindex';
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
/Server is rebooted prior to any tests
Whern run as default, the optimizer (although some attribute this to the execution engine) chooses direct path read into PGA in preference to db file scattered read.
With this choice it takes 6,520 seconds to complete the query. The results are shown below
SQL ID: 78kxqdhk1ubvq
Plan Hash: 1148949653
SELECT *
FROM
TDASH WHERE OBJECT_ID = :B1
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 2 47 0 0
Execute 100 0.00 0.00 1 51 0 0
Fetch 100 10.88 6519.89 194142802 194831012 0 100
total 201 10.90 6519.90 194142805 194831110 0 100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER) (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS FULL TDASH (cr=1948310 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 TABLE ACCESS MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 3 0.00 0.00
db file sequential read 2 0.00 0.00
direct path read 1517504 0.05 6199.93
asynch descriptor resize 196 0.00 0.00
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 3.84 4.03 320 48666 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 1 3.84 4.03 320 48666 0 1
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
SQL ID: 9babjv8yq8ru3
Plan Hash: 0
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 3.84 4.03 320 48666 0 2
Fetch 0 0.00 0.00 0 0 0 0
total 3 3.84 4.03 320 48666 0 2
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.00 0.00
log file sync 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.01 0.00 2 47 0 0
Execute 129 0.01 0.00 1 52 2 1
Fetch 140 10.88 6519.89 194142805 194831110 0 130
total 278 10.91 6519.91 194142808 194831209 2 131
Misses in library cache during parse: 9
Misses in library cache during execute: 8
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 5 0.00 0.00
Disk file operations I/O 3 0.00 0.00
direct path read 1517504 0.05 6199.93
asynch descriptor resize 196 0.00 0.00
102 user SQL statements in session.
29 internal SQL statements in session.
131 SQL statements in session.
1 statement EXPLAINed in this session.
Trace file: mydb_ora_16394_test_with_tdash_ssdtester_noindex.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
102 user SQL statements in trace file.
29 internal SQL statements in trace file.
131 SQL statements in trace file.
11 unique SQL statements in trace file.
1 SQL statements EXPLAINed using schema:
ssdtester.plan_table
Schema was specified.
Table was created.
Table was dropped.
1531657 lines in trace file.
6520 elapsed seconds in trace file.I then force the query not to use direct path read by invoking
ALTER SESSION SET EVENTS '10949 trace name context forever, level 1' -- No Direct path read ;In this case the optimizer uses db file scattered read predominantly and the query takes 4,299 seconds to finish which is around 34% faster than using direct path read (default).
The report is shown below
SQL ID: 78kxqdhk1ubvq
Plan Hash: 1148949653
SELECT *
FROM
TDASH WHERE OBJECT_ID = :B1
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 2 47 0 0
Execute 100 0.00 0.00 2 51 0 0
Fetch 100 143.44 4298.87 110348670 194490912 0 100
total 201 143.45 4298.88 110348674 194491010 0 100
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER) (recursive depth: 1)
Rows Row Source Operation
1 TABLE ACCESS FULL TDASH (cr=1944909 pr=1941430 pw=0 time=0 us cost=526908 size=8091 card=1)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 TABLE ACCESS MODE: ANALYZED (FULL) OF 'TDASH' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
Disk file operations I/O 3 0.00 0.00
db file sequential read 129759 0.01 17.50
db file scattered read 1218651 0.05 3770.02
latch: object queue header operation 2 0.00 0.00
DECLARE
type array is table of tdash%ROWTYPE index by binary_integer;
l_data array;
l_rec tdash%rowtype;
BEGIN
SELECT
a.*
,RPAD('*',4000,'*') AS PADDING1
,RPAD('*',4000,'*') AS PADDING2
BULK COLLECT INTO
l_data
FROM ALL_OBJECTS a;
DBMS_MONITOR.SESSION_TRACE_ENABLE ( waits=>true );
FOR rs IN 1 .. 100
LOOP
BEGIN
SELECT * INTO l_rec FROM tdash WHERE object_id = l_data(rs).object_id;
EXCEPTION
WHEN NO_DATA_FOUND THEN NULL;
END;
END LOOP;
END;
call count cpu elapsed disk query current rows
Parse 0 0.00 0.00 0 0 0 0
Execute 1 3.92 4.07 319 48625 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 1 3.92 4.07 319 48625 0 1
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
SQL ID: 9babjv8yq8ru3
Plan Hash: 0
BEGIN DBMS_OUTPUT.GET_LINES(:LINES, :NUMLINES); END;
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 1
Fetch 0 0.00 0.00 0 0 0 0
total 2 0.00 0.00 0 0 0 1
Misses in library cache during parse: 0
Optimizer mode: ALL_ROWS
Parsing user id: 96 (SSDTESTER)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 1 0.00 0.00
SQL*Net message from client 1 0.00 0.00
OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 2 3.92 4.07 319 48625 0 2
Fetch 0 0.00 0.00 0 0 0 0
total 3 3.92 4.07 319 48625 0 2
Misses in library cache during parse: 0
Misses in library cache during execute: 1
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
SQL*Net message from client 2 0.00 0.00
log file sync 1 0.00 0.00
OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
call count cpu elapsed disk query current rows
Parse 9 0.01 0.00 2 47 0 0
Execute 129 0.00 0.00 2 52 2 1
Fetch 140 143.44 4298.87 110348674 194491010 0 130
total 278 143.46 4298.88 110348678 194491109 2 131
Misses in library cache during parse: 9
Misses in library cache during execute: 8
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 129763 0.01 17.50
Disk file operations I/O 3 0.00 0.00
db file scattered read 1218651 0.05 3770.02
latch: object queue header operation 2 0.00 0.00
102 user SQL statements in session.
29 internal SQL statements in session.
131 SQL statements in session.
1 statement EXPLAINed in this session.
Trace file: mydb_ora_26796_test_with_tdash_ssdtester_noindex_NDPR.trc
Trace file compatibility: 11.1.0.7
Sort options: default
1 session in tracefile.
102 user SQL statements in trace file.
29 internal SQL statements in trace file.
131 SQL statements in trace file.
11 unique SQL statements in trace file.
1 SQL statements EXPLAINed using schema:
ssdtester.plan_table
Schema was specified.
Table was created.
Table was dropped.
1357958 lines in trace file.
4299 elapsed seconds in trace file.I note that there are 1,517,504 waits with direct path read with total time of nearly 6,200 seconds. In comparison with no direct path read, there are 1,218,651 db file scattered read waits with total wait time of 3,770 seconds. My understanding is that direct path read can use single or multi-block read into the PGA. However db file scattered reads do multi-block read into multiple discontinuous SGA buffers. So it is possible given the higher number of direct path waits that the optimizer cannot do multi-block reads (contigious buffers within PGA) and hence has to revert to single blocks reads which results in more calls and more waits?.
Appreciate any advise and apologies for being long winded.
Thanks,
MichHi Charles,
I am doing your tests for t1 table using my server.
Just to clarify my environment is:
I did the whole of this test on my server. My server has I7-980 HEX core processor with 24GB of RAM and 1 TB of HDD SATA II for test/scratch backup and archive. The operating system is RHES 5.2 64-bit installed on a 120GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive.
Oracle version installed was 11g Enterprise Edition Release 11.2.0.1.0 -64bit. The binaries were created on HDD. Oracle itself was configured with 16GB of SGA, of which 7.5GB was allocated to Variable Size and 8GB to Database Buffers.
For Oracle tablespaces including SYS, SYSTEM, SYSAUX, TEMPORARY, UNDO and redo logs, I used file systems on 240GB OCZ Vertex 3 Series SATA III 2.5-inch Solid State Drive. With 4K Random Read at 53,500 IOPS and 4K Random Write at 56,000 IOPS (manufacturer’s figures), this drive is probably one of the fastest commodity SSDs using NAND flash memory with Multi-Level Cell (MLC). Now my T1 table created as per your script and has the following rows and blocks (8k block size)
SELECT
NUM_ROWS,
BLOCKS
FROM
USER_TABLES
WHERE
TABLE_NAME='T1';
NUM_ROWS BLOCKS
12000000 178952which is pretty identical to yours.
Then I run the query as brelow
set timing on
ALTER SESSION SET TRACEFILE_IDENTIFIER = 'test_bed_T1';
ALTER SESSION SET EVENTS '10046 TRACE NAME CONTEXT FOREVER, LEVEL 8';
SELECT
COUNT(*)
FROM
T1
WHERE
RN=1;
which gives
COUNT(*)
60000
Elapsed: 00:00:05.29
tkprof output shows
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 0.02 5.28 178292 178299 0 1
total 4 0.02 5.28 178292 178299 0 1
Compared to yours:
Fetch 2 0.60 4.10 178493 178498 0 1
It appears to me that my CPU utilisation is by order of magnitude better but my elapsed time is worse!
Now the way I see it elapsed time = CPU time + wait time. Further down I have
Rows Row Source Operation
1 SORT AGGREGATE (cr=178299 pr=178292 pw=0 time=0 us)
60000 TABLE ACCESS FULL T1 (cr=178299 pr=178292 pw=0 time=42216 us cost=48697 size=240000 card=60000)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 SORT (AGGREGATE)
60000 TABLE ACCESS MODE: ANALYZED (FULL) OF 'T1' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 3 0.00 0.00
SQL*Net message from client 3 0.00 0.00
Disk file operations I/O 3 0.00 0.00
direct path read 1405 0.00 4.68
Your direct path reads are
direct path read 1404 0.01 3.40Which indicates to me you have faster disks compared to mine, whereas it sounds like my CPU is faster than yours.
With db file scattered read I get
Elapsed: 00:00:06.95
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 1 0.00 0.00 0 0 0 0
Fetch 2 1.22 6.93 178293 178315 0 1
total 4 1.22 6.94 178293 178315 0 1
Rows Row Source Operation
1 SORT AGGREGATE (cr=178315 pr=178293 pw=0 time=0 us)
60000 TABLE ACCESS FULL T1 (cr=178315 pr=178293 pw=0 time=41832 us cost=48697 size=240000 card=60000)
Rows Execution Plan
0 SELECT STATEMENT MODE: ALL_ROWS
1 SORT (AGGREGATE)
60000 TABLE ACCESS MODE: ANALYZED (FULL) OF 'T1' (TABLE)
Elapsed times include waiting on following events:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
SQL*Net message to client 2 0.00 0.00
Disk file operations I/O 3 0.00 0.00
db file sequential read 1 0.00 0.00
db file scattered read 1414 0.00 5.36
SQL*Net message from client 2 0.00 0.00
compared to your
db file scattered read 1415 0.00 4.16On the face of it with this test mine shows 21% improvement with direct path read compared to db scattered file read. So now I can go back to re-visit my original test results:
First default with direct path read
call count cpu elapsed disk query current rows
Parse 1 0.01 0.00 2 47 0 0
Execute 100 0.00 0.00 1 51 0 0
Fetch 100 10.88 6519.89 194142802 194831012 0 100
total 201 10.90 6519.90 194142805 194831110 0 100
CPU ~ 11 sec, elapsed ~ 6520 sec
wait stats
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
direct path read 1517504 0.05 6199.93
roughly 0.004 sec for each I/ONow with db scattered file read I get
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 2 47 0 0
Execute 100 0.00 0.00 2 51 0 0
Fetch 100 143.44 4298.87 110348670 194490912 0 100
total 201 143.45 4298.88 110348674 194491010 0 100
CPU ~ 143 sec, elapsed ~ 4299 sec
and waits:
Event waited on Times Max. Wait Total Waited
---------------------------------------- Waited ---------- ------------
db file sequential read 129759 0.01 17.50
db file scattered read 1218651 0.05 3770.02
roughly 17.5/129759 = .00013 sec for single block I/O and 3770.02/1218651 = .0030 for multi-block I/ONow my theory is that the improvements comes from the large buffer cache (8320MB) inducing it to do some read aheads (async pre-fetch). Read aheads are like quasi logical I/Os and they will be cheaper compared to physical I/O. When there is large buffer cache and read aheads can be done then using buffer cache is a better choice than PGA?
Regards,
Mich -
Get context path in a jsp without using a scriptlet
Hi Guys
I am using Scriptlet to get a application context path in a JSP. I want to get the context path with out using an scriptlet in a JSP, is there way to achieve this..?
<%=request.getContextPath() %>/listofvalues.do?method=viewListOfValues thanks in advance.
Regards
Praveen
Edited by: praveen_kumarvr on Jul 3, 2008 8:30 AM${pageContext.request.contextPath}A common practice is to put this value in the <base href> in the HTML head and then use this as the root for all of the relative URL's in the page.
-
Request context path for portlet has wrong port number
I have a JSF application deployed as a portlet on the WLS_Portlet domain with port 8889. The portlet is being consumed in WebCenter Spaces, which lives in the WLS_Spaces domain with port 8888.
In my code, I am trying to get the request context path:
FacesContext.getCurrentInstance().getExternalContext().getRequestContextPath();
I expect this to return http://host:8889/contextroot (where I am able to access my app resources). Instead, it is returning http://host:8888/contextroot.
Any ideas why this is happening?
Edited by: user9171296 on Jun 16, 2010 10:32 AMHi,
if you expeience Web Center problems, then best is to get an answer on the Web Center forum: WebCenter Portal
Frank -
Hi
1. I am using WSAD 5.0
2. I have created a web project it has the following directory struture
Java Source
MyFile.java // This file needs to access the xml in MyData
Web Content
// MyData contains few xml and js files
MyData // POSITION 1
META-INF
WEB-INF
classes
lib
MyData // POSITION 2
MyShow.jsp
3. In the buildpath the source is set to Java Source
**Question 1: Which is the correct POSITION of the Folder 'MyData'?
1. Assuming the folder is placed in POSTION 1
Java file
-- What would be correct relative path access the xml file in MyData
(i tried ../Web Content/MyData/abc.xml,
./Web Content/MyData/abc.xml and
/Web Content/MyData/abc.xml but NOTHING worked)
<I know the ./ is for current directory and ../ is for parent one and / is for the root >
Jsp file
I am ABLE to access the javascript files with path /MyData/abc.js
2. Assuming the folder is placed in POSTION 2
Java file
-- I am ABLE to acces the xml file with the path /MyData/abc.xml
Jsp file
-- The file is NOT ABLE to access the path /WEB-INF/MyData/abc.js (WSAD automatically also creates the same path)
**Question 2: Depending on the position of folder how would i access MyData from JSP or Java file
-- One more important thing is that in WSAD 5.1 the folder created is 'WebContent' instead of 'Web Content' <without space>, Does it has any thing to do with it?
Any help would be highly appreciated, any links which would give my insight on this will also be of immense help
regards
Tarun DhillonI am not sure i understand your problem, however you need to arrange your directories so that they are in a logical order from the context root for your application
for Websphere Developer questions, you should probably try an websphere newsgroup as well. -
Multiple Context Paths Per Web Application
Hi,
We have a Web Application which has a Context Path of "titanadmin". We have some
HTML pages which refer to this within the URLs they contain. We need to move the
functionality in this Web Application to another Web Application with a Context
Path of "gp3admin". We cannot change the URLs in the generated HTML.
So, is it possible for a Web Application to have multiple Context Paths, so that
URLs starting with "/titanadmin/" and "/gp3admin/" both go to the same Web Application.
Thanks,
DaveThere is no hard limit to the number of Web Applications (I managed a WSSv3 farm that had 60+, for example). The issue is memory-related and primarily stems from 32bit systems where it was much easier to get Out Of Memory errors on the IIS Application Pools
when performing a large operation across a 32bit Application Pool (e.g. crawling). However, if you limit each IIS Application Pool to about 10 Web Applications (again, in 32bit land that no longer applies), everything generally works OK given the Web Applications
do not have a very large amount of content.
But, if HNSC is in use, a single Web Application should be sufficient, barring any Web Application-specific settings you might need to make.
Trevor Seward
Follow or contact me at...
  
This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs. -
Deployment Failure: Context path already in use
I am trying to deploy a webservice using a stateless session EJB, similar to the
"trader" example that comes with weblogic 8.1. I used the "trader" source files
as a blueprint for my implementation... the service builds successfully via ant,
but the following error shows up in the server console:
<Error> <Deployer> <BEA-149201> <Failed to complete the deployment task with ID
6 for the application appsdirwebservice_modelread_ear.
weblogic.management.ApplicationException:
Exception:weblogic.management.ApplicationException: prepare failed for webservice
Module: webservice Error: Context path 'webservice' is already in use by
the module: webservice application: appsdirwebservices_trader.ear
What exactly is the "context path", and what do I have to change in the .properites
or build.xml (or other) files in order to avoid this error?I do not know Contribute 2, but what I do know that in later
versions of the program, this message means that you have another
connection in Contribute pointing to the same webaddress.
Check this by doing the following:
1. in the main menu go to Edit>My Connections
2. check all connections there to find the path you described
3. delete or adjust this connection -
How to set the servlet context path manually in Tomcat web server.
I tested some servlets by putting them in the folder , which the tomcats examples application uses (ie Tomcat 4.1\webapps\examples\WEB-INF\classes\) and it appeared to be working fine.
I was calling the servlet like this : http://localhost:2006/examples/servlet/TestServlet
But when I installed my own WAR file in the server , the servlet is not working now. now the new location of my servlets is : Tomcat 4.1\webapps\MyApp\WEB-INF\classes\
and I'm trying to call the servlet like this : http://localhost:2006/MyApp/servlet/TestServlet
The error , what i'm getting is :
description :The requested resource (/MyApp/servlet/TestServlet) is not available.
Some body please tell where I'm making the mistake ? I believe this may have something to do with the servlet context path setting. If anybody has any idea , how to set the path..will be much appreciated.Thanx for your reply , at first I was not using any web.xml(since not mandatory) but even after using the web.xml file the error is coming . Please have a look into the contents of the web.xml file and let me know if you find any problem...
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<servlet>
<servlet-name>TestServlet</servlet-name>
<servlet-class>TestServlet</servlet-class>
</servlet>
</web-app>
one more thing I would like to tell you here. I was just looking into the configuration of Iplanet web server..I found that , there are options to set the servlet container path (like : - Prefix: /servlet
Servlet Directory: /ecomm/iplanet/nes60/product/docs/container )
so from here I came to know that "container " is the folder where we should put our servlets and it has URI as "servlet" but yet I'm not able to find any option in the Tomcat Web server to set the servlet container to any different directory.
If you have any idea please let me know. -
Hi all.
I have a strange problem, that I hope some of you can help me with.
First of all let me explain my setup:
1. I have a faces page, that in an action method does a redirect to a different server.
2. That server then redirects back to a Servlet on my application server.
3. The Servlet then forwards to one of my own faces pages. (same context)
4. Page is displayed, BUT the form tag is now rendered like this:
<form id="form1" method="post" action="/app/servlet/testpage.jsp">
should have looked like this:
<form id="form1" method="post" action="/app/testpage.jsp">
Somehow the Servlet (context?) is added to the context path???
More info:
The way I do the forward in step 3, is like this:
LifecycleFactory lFactory = (LifecycleFactory) FactoryFinder
.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
Lifecycle lifecycle = lFactory
.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
FacesContextFactory fcFactory = (FacesContextFactory) FactoryFinder
.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
FacesContext facesContext = fcFactory.getFacesContext(
getServletContext(), request, response, lifecycle);
Application application = facesContext.getApplication();
ViewHandler viewHandler = application.getViewHandler();
String viewId = "";
UIViewRoot view = viewHandler.createView(facesContext, viewId);
facesContext.setViewRoot(view);
String outcome = "ok";
NavigationHandler navigationHandler = application
.getNavigationHandler();
navigationHandler.handleNavigation(facesContext, null, outcome);
lifecycle.render(facesContext);Guess that's might be a cause to the problem?
Have tried a plain servlet forward (and then no additional context is added..., BUT causes lots of other problems)
request.getRequestDispatcher("xxx").forward(request, response);Will really appreciate some input on this.
Thanks in advance.
Edited by: mikfu on Jan 5, 2009 9:44 PMHi - me again.
Can anybody tell me is this should be the expected behaviour for such a setup?
I tried another setup, where I redirect to a page within the same application context, and is still getting same problem.
Thanks. -
Hello all,
Stack trace :
GeneralException Node((<Context path of node>): cannot bind or add element, because it is already bound to a node
I am trying to upload data from excel file in web dynpro context.In the process, when I create and add an element to the node which I want to populate with excel data, it throws the above mentioned exception.
Any idea as to wht is causing the problem ?Hi,
GeneralException Node((<Context path of node>): cannot bind or add element, because it is already bound to a node
It seems that its a mapped node, try to bind or addelements at the source.
Ex: If this node is mapped from controller to view try to add elements in contoller instead of doing in view.
Regards
Ayyapparaj
Maybe you are looking for
-
Magic Mouse, Trackpad feature in Autocad Bootcamp
Hi, i dunno which of Magic mouse or Magic trackpad i should buy.. Well, i wanna know which one is better use with AutoCAD for windows in bootcamp.. Is magic mouse gesture work in Windows like in OSX?? And Trackpad gesture works in Windows like in OSX
-
How to load a flat file with utf8 format in odi as source file?
Hi All, Anybody knows how we can load a flat file with utf8 format in odi as source file.Please everybody knows to guide me. Regards, Sahar
-
Default user settings template for new IDs
Hello, I would like to set the default language in the User Master record (SU3 / SU01) to 'EN' for new IDs. It is currently blank when a new user is created. Where are the User default settings defined for Language? Thank you, Rob
-
I cannot seem to get the speed of my Ipone 4S to improve
The Iphone 4S is connected to my Airport Extreme which is in a network with an Express. The speed i get on my phone or ipad (second generation) seems to be maximized at 65 Mb/s, is that normal?
-
Ok, so i bought a new ipod touch on the weekend which was 5 days ago. It was working well until my ipod decided not to work and to turn off. I was searching to see if my ipod had some how gotten water damage as i use it when excercising and i noticed