Recent Notes
Displaying keyword search results 1 - 12
Created by nogeek on November 27, 2011 12:24:27
Last update: November 27, 2011 12:24:27
There is no XSLT 2.0 support in the JDK as of 7.0. According to Stackoverflow , there are three Java packages that support XSLT 2.0: Saxon IBM WebSphere XML Feature Pack Oracle XDK There are no known support for XSLT in browsers. According to Wikipedia : XSLT is developed by the World Wide Web Consortium (W3C). The most recent version is XSLT 2.0, which reached W3C recommendation status on 23 January 2007. As of 2010, however, XSLT 1.0 is still widely used, as there are no products that support XSLT 2.0 running in the browser, nor on some important server environments such as LAMP. Expressions like this:
format-date(xs:date('1999-12-31'), '[D01] [MNn] ... where format-date is a XSLT 2.0 function and date is a XPath 2.0 constructor...
Created by Fang on September 07, 2009 20:44:15
Last update: November 03, 2011 14:43:19
Step 1: Repackage a web app as EAR A Java EE application is a multimodule Maven project. At the very least you'll need to package a WAR and an EAR. To get started, I'll simply re-package the simple webapp as an EAR. Create a directory named javaee-app Copy the webapp from here to javaee-app . Rename struts1app to webapp . Create pom.xml under javaee-app :
<project> <modelVersion>4.0.0</modelVersion>... Create a directory named ear under javaee-app . Create pom.xml under ear : <project> <modelVersion>4.0.0</modelVersion>... Modify pom.xml in the webapp directory so that it looks like this: <project> <modelVersion>4.0.0</modelVersion> ... Build with " mvn package " in the javaee-app directory. You can see that ear-1.0.ear is successfully generated in javaee-app/ear/target . Maven successfully resolves dependencies between the sub-projects....
Created by nogeek on April 25, 2010 05:09:14
Last update: April 25, 2010 05:10:46
Oracle Web Cache version used:
Oracle Application Server Web Cache 10.1.2.3.0
...
The test page is a simple Struts action sending a URL redirect:
public ActionForward execute(ActionMapping map...
Web Cache setup
Origin server
Host Name Port
oas.host 7777
Site
Host Name Port URL Path Prefix
webcache.host 80
Test results
Request directly to the OC4J (Oracle Application Server):
C:\work\testAppWebApp2>curl --dump-header - http:/...
Request to Oracle Web Cache:
C:\work\testAppWebApp2>curl --dump-header - http:/...
Notice that Oracle Web Cache correctly translated the host name in the header and HTML page. However, the port number remained that of the Oracle App Server.
Created by Dr. Xi on August 20, 2009 03:24:25
Last update: August 20, 2009 03:25:55
I get this error using PL/SQL to enqueue a JMS message in Oracle XE:
Oracle: PLS-00302: component 'CONSTRUCT' must be declared .
Following an advice I found on the web , I ran the script "$ORACLE_HOME/rdbms/admin/prvtaqal.plb" as SYS in sqlplus. That worked even though I got a bunch of errors running the script:
Warning: Package created with compilation errors.
...
Created by Dr. Xi on November 06, 2008 20:11:19
Last update: March 13, 2009 21:37:36
To run a web app in Oracle Application Server with precompiled JSPs (therefore, not recompiling a JSP when requested), add the following servlet section to web.xml:
<?xml version="1.0" encoding="iso-8859-1"?>
<we...
Or, uncomment the relevant section in $ORACLE_HOME/j2ee/OC4J_INST/config/global-web-application.xml :
<servlet>
<servlet-name>jsp</servlet-...
Created by Dr. Xi on October 15, 2008 19:49:31
Last update: October 15, 2008 19:49:31
Ant script:
<?xml version="1.0"?>
<project name="OC4JDe...
Deployment properties:
# Deployment properties
targetenv=Development
...
Created by Dr. Xi on October 10, 2008 22:58:21
Last update: October 10, 2008 23:10:40
This is the stack trace from a SOAP stub generated by Oracle OC4J 10.1.3:
C:\tmp>java -Xmx128M TestWs
Exception in thread...
Turned out that this was a server side error (out of memory on server, as can be guessed from the exception), which in my case was running Oracle OC4J. Restarting the server with switch -Xmx128M fixed the problem.
The weird thing was that it was running fine when requesting the same web service from Firefox or IE (instead of the standalone Java client).
Created by Dr. Xi on May 14, 2008 22:55:22
Last update: May 14, 2008 23:07:49
This procedure works for Oracle application server 10.1.3.1, SOA suite. But should be applicable for standalone OC4J or JDeveloper installations with minor modifications. $ORACLE_HOME is the home directory for Oracle app server. $JDEV_HOME is the home directory for JDeveloper.
1. Change directory to $ORACLE_HOME/j2ee , mkdir lib
2. Copy xmlparserv2.jar from $JDEV_HOME to $ORACLE_HOME/j2ee/lib .
3. Copy ocj.jar and jdev_remote.jar from $JDEV_HOME/jdev/lib to $ORACLE_HOME/j2ee/home/lib .
4. Edit global-web-application.xml under your OC4J instance's config directory. Change the development attribute to true .
<orion-web-app
xmlns:xsi="http://www.w3.org/...
5. Add the following to the servlet section of global-web-application.xml :
<servlet>
<servlet-name>jsp</servlet-na...
6. Edit $ORACLE_HOME/opmn/conf/opmn.xml , add -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000 to start-parameters/java-options :
<process-type id="MYOC4J" module-id="OC4J" status=...
7. In Eclipse, open to port 4000 for remote debugging.
Created by Dr. Xi on April 22, 2008 21:55:46
Last update: April 22, 2008 21:56:59
When I ran the genInterface task, I got a weird message saying that it "Failed to find wsa.jar", although the interfaces were correctly generated.
<target name="gen-interface" depends="init" de...
After some digging, I found that setting the environment variable ORACLE_HOME to where JDeveloper is installed makes it disappear. On Windows XP, I have to set ORACLE_HOME in all caps, set oracle_home doesn't work, even though Windows is case insensitive.
Created by Dr. Xi on April 07, 2008 22:18:29
Last update: April 07, 2008 22:19:30
Oracle's documentation on how to set up Ant tasks for web services is ambiguous and tedious. Here's a simple Ant file to accomplish that task.
<project name="TEST" basedir="." default="usage" x...
Created by Dr. Xi on August 15, 2007 18:08:34
Last update: November 08, 2007 22:00:01
I had this problem when deploying a J2EE application into Oracle app server. It worked fine with an OC4J container configured in the default group. But it failed to start with an OC4J container I created. Here's a sample stack trace of the initialization exception:
07/08/14 13:32:46.34 10.1.3.3.0 Started 07/08/1... The problem was, the struts ActionServlet loads commons logging LogFactory, the log factory somehow knows that it needs log4j, but it can't load log4j since it's loaded by a different class loader. The solution for Oracle is to omit commons logging from the list of inherited libraries. Add this to META-INF/orion-application.xml solves the problem: <imported-shared-libraries> <remove-inhe... Actually, this is a quite common problem with commons-logging. If you search the web, you'll find that people have...
Created by Dr. Xi on August 16, 2007 18:47:40
Last update: August 16, 2007 18:52:02
If you use quartz or the plain old java.util.Timer class to schedule jobs in an OC4J container, you need to enable the -userThreads switch with the OC4J container. This is the relevant section in $ORACLE_HOME/opmn/conf/opmn.xml :
<process-type id="INST1" module-id="OC4J" status="...
Or, you can add it through the Oracle em console. Go to the OC4J container, click "Administration" tab, then "Server Properties". Add "-userThreads" to "Start-parameters: OC4J Options".
Debu Panda has written a good article on using quartz in the Oracle environment: Using Quartz Enterprise Scheduler in J2EE