Bug in the Oracle JSP parser..?
Hi,
I seem to have run into a problem with double quotes inside attributes of a custom tag. For example, on Tomcat the following line is valid in a JSP:
<mylib:person label="<%="Mr " + surname%>" />
Tomcat treats the "Mr " in the expression as a Java string, but OC4J seems to treat the first quote inside the expression as the end of the label attribute. It then complains because Mr is not a valid attribute of the tag.
Surely this is a bug?!
There are workarounds:
<mylib:person label='<%="Mr " + surname%>' />
i.e. use single quotes for the attribute value, but what if the JSP expression actually contains a single quote as well?!
<mylib:button action='<%="location.href='" + url + "'"%>' />
It's starts to get silly, and I end up having to create scriplet variables just to go inside the attribute. I'm migrating from Tomcat, and have numerous instances of this.
Is this a bug? (I'm using OC4J 9.03) Is there a setting I've missed?
Thanks,
Phil
That doesn't seem to work. On the login page we have the line (uses our own custom tag called "form"):
<html:form method="post" action="<%=response.encodeURL("j_security_check")%>" >
OC4J complains about this (Tomcat is happy enough). If I change this to:
<html:form method="post" action="<%=response.encodeURL(\""j_security_check\"")%>" >
then it won't compile in either OC4J or Tomcat... which to be honest is what I expected. The quotes is inside a JSP expression; it's not really part of the attribute.
Or did you mean something else?
Thanks,
Phil
Similar Messages
-
We have 3 nodes of OIM servers in our clustered production environment. While accessing OIM server on first node, following error is coming in the browser window -
OracleJSP error: oracle.jsp.parse.JspParseException:
/oracle/iam/ui/main/signin.jspx: Line # 5, &amp;amp;lt;af:document id="d1" initialFocusId="pt1:_pt_it1" theme="light" title="#{uiBundle['IDENTITY_SELF_SERVICE_TITLE']}"&amp;amp;gt;
Error: Encountered deferred syntax #{ in template text. If intended as a literal, escape it or set directive deferredSyntaxAllowedAsLiteral
The OIM UI is accessible on the other 2 nodes. There are no changes made in the environment. I have also attached the OIM diagnostic logs for your analysis.
Please let us know the steps to resolve this issue in production environment.No..
I have followed the way to add JSF libray,
1)Right click the projet->project properties->javadoc->JSP taglibraries
2)Inside the Distributed Library i have selected the JSTL core 1.2 and click on add.
3) Then a new dialogue box of Choose tablibraries came.inside that only struts bean,struts Html etc are seeing.
What i need to select?..Do i am following the right way?
Please help.. -
Server Error 500: Cant find taglibs oracle.jsp.parse.JspParseException
I dont know what iam doing wrong. My project runs under tomcat, but not under oc4j.
Here is my stacktrace:
500 Internal Server Error
OracleJSP: oracle.jsp.parse.JspParseException: Zeilennummer 3, <%@ taglib uri="/tags/fn" prefix="fn" %>
Fehler:oracle.xml.parser.v2.XMLParseException ( /WEB-INF/jsp-fragments/taglibs.jsp ):
Zeile #:3 Spalte #:48 : FIXED type Attribute value not equal to the default value 'http://java.sun.com/xml/ns/j2ee'.
Zeile #:4 Spalte #:56 : Attribute 'xmlns:xsi' used but not declared.
Zeile #:5 Spalte #:81 : Attribute 'xsi:schemaLocation' used but not declared.
Zeile #:6 Spalte #:16 : Attribute 'version' used but not declared.
Zeile #:8 Spalte #:15 : Invalid element 'description' in content of 'taglib', expected elements '[tlibversion]'.
Zeile #:8 Spalte #:15 : Element 'description' used but not declared.
Zeile #:9 Spalte #:16 : Invalid element 'display-name' in content of 'taglib', expected elements '[tlibversion]'.
Zeile #:9 Spalte #:16 : Element 'display-name' used but not declared.
Zeile #:10 Spalte #:16 : Invalid element 'tlib-version' in content of 'taglib', expected elements '[tlibversion]'.
Zeile #:10 Spalte #:16 : Element 'tlib-version' used but not declared.
Zeile #:11 Spalte #:14 : Invalid element 'short-name' in content of 'taglib', expected elements '[tlibversion]'.
Zeile #:11 Spalte #:14 : Element 'short-name' used but not declared.
Zeile #:12 Spalte #:7 : Invalid element 'uri' in content of 'taglib', expected elements '[tlibversion]'.
Zeile #:14 Spalte #:12 : Invalid element 'function' in content of 'taglib', expected elements '[tlibversion]'.
Zeile #:14 Spalte #:12 : Element 'function' used but not declared.
Zeile #:15 Spalte #:17 : Element 'description' used but not declared.
Zeile #:19 Spalte #:20 : Element 'function-class' used but not declared.
Zeile #:20 Spalte #:24 : Element 'function-signature' used but not declared.
Zeile #:21 Spalte #:13 : Element 'example' used but not declared.
Zeile #:26 Spalte #:12 : Invalid element 'function' in content of 'taglib', expected elements '[tlibversion]'.
hope that someone can help me out.
thanksWhich oc4j version are you using? You can get the version by
java -jar oc4j.jar -version -
Exception:oracle.jsp.parse.JspParseException
hi,
I deploy my bibeans application via jdeveloper in to application server and copy my lib file named bibeans.jar in web-inf/lib. after I try to view my jsp page which view my graph my browser show internal server error message (error 500 in IE)and following error in my log file :
04/12/14 11:00:31 Started
04/12/14 11:00:33 webapp: jsp: init
04/12/14 11:00:33 webapp: uix: init
04/12/14 11:00:33 webapp: 9.0.4.0.0 Started
04/12/14 11:02:42 webapp: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://xmlns.oracle.com/bibeans" prefix="orabi" %>
Error: Unable to load taghandler class: http://xmlns.oracle.com/bibeans
04/12/14 11:04:22 webapp: JspServlet: unable to dispatch to requested page: Exception:oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="http://xmlns.oracle.com/bibeans" prefix="orabi" %>
Error: Unable to load taghandler class: http://xmlns.oracle.com/bibeans
what should I do ???
thanks in advance,
shimaTo the web.xml file add a taglib element.
<taglib>
<taglib-uri>http://xmlns.oracle.com/bibeans/</taglib-uri>
<taglib-location>/WEB-INF/BITags.tld</taglib-location>
</taglib> -
OracleJSP:oracle.jsp.parse.JspParseException Urgent please
Hai,
I deployed my application on OC4J and while i am accesing my application, I got this below mentioned error on browser.Can any body have any clues about this error. I am really struggling hard to get out it.If you have any suggessions,please let me know.
Request URI:/en_US/clubroster.jsp
Exception:
OracleJSP:oracle.jsp.parse.JspParseException: /en_US/roster.jsp: Line # 350, <mp:crresults summaryList="<%=summarylist%>" lang=en_US />
Error: Expecting quoted value, got character: e
Thanks!
Tracy.Hai qlin,
Thanks for you reply.I resolved the issue by putting en_us within quotes.
<mp:crre summaryList="<%=summarylist%>" lang="en_US" />.Thanks again.
Tracy. -
Oracle.jsp.parse.JspParseException
After making minor changes to my jsp's, i deployed the war and now the jsp's cant find the tld's, even though they exist.
I get the following error:
500 Internal Server Error
OracleJSP: oracle.jsp.parse.JspParseException: Line # 1, <%@ taglib uri="/tld/c" prefix="c"%>
Error: java.io.IOException: Referenced TLD does not exist or is invalid
Any say...please:-|?Does making change in the global-web-application.xml help (jsp-cache-tlds="false")?I do not see any relevance of gloabl-web-application.xml here.
They exist in WEB-INF/tld folder.
OracleJSP: oracle.jsp.parse.JspParseException: Line # 3, <%@ taglib
uri="/tld/extremecomponents" prefix="ec" %>
Error: java.io.IOException: Referenced TLD does not exist or is invalidIf it is in WEB-INF/tld, then you can write
<%@ taglib uri="/WEB-INF/tld/extremecomponents.tld" prefix="ec" %>
The "/WEB-INF" is missing in your version.
Of course, there are other ways to provide the uri attribute. However, the above is most direct way. As a sanity test, let us get it working first by the above way. -
Oracle.jsp.parse.JspParseException Error
I am trying to migrate for Oracle 9ias 9.0.3 to ias 10G (10.1.2.0.2) and i have obtaining errors with jsp´s:
OracleJSP: oracle.jsp.parse.JspParseException: /WEB-INF/jsp/primary/./actualidad/./ultimosDocsLegisAutoyCalendario.jsp: Line # 199, <aranzadi:actual tipo="<%=tipo%>"><%=xml%><%aranzadi:actual%>
Error: actual must be terminated with /> or %> not >
The jsp worked in the 9.0.3
That is the jsp content:
<%@ page contentType="text/html;charset=iso-8859-1" language="java" %>^M
<%@page import="es.aranzadi.base.SessionNames"%>^M
<%@page import="es.aranzadi.seguridad.ServiciosSeguridad"%>^M
<%@page import="es.aranzadi.seguridad.TipoProducto"%>^M
<%@page import="es.aranzadi.seguridad.TipoZona"%>^M
<%@page import="es.aranzadi.seguridad.ListaProductos"%>^M
<%@page import="java.util.Iterator"%>^M
<%@ page import="java.util.Collection"%>^M
<%@ page import="java.util.ArrayList"%>^M
<%@page import="es.aranzadi.utilidades.actualidad.Actualidad"%>^M
<%@ page import="org.apache.struts.action.ActionForm"%>^M
<%@ page import="es.aranzadi.util.Utilidades"%>^M
<%@page import="org.apache.log4j.Category"%>^M
^M
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>^M
<%@ taglib uri="/WEB-INF/taglibs-session.tld" prefix="session"%>^M
<%@ taglib uri="/WEB-INF/aranzadi.tld" prefix="aranzadi"%>^M
<%@taglib uri="/WEB-INF/cache.tld" prefix="cache"%>^M
<%@page import="es.aranzadi.services.Propiedades"%>^M
<%@page import="es.aranzadi.util.navegacion.ServiciosConfiguracion"%>^M
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>^M
^M
^M
"ultimosDocsLegisAutoyCalendario.jsp" [Read only] 210 lines, 7583 characters
}^M
}^M
String p_tipo = request.getParameter("tipo");^M
if(tipo != null && !tipo.equals(""))^M
tipo = p_tipo;^M
^M
String xml=actualidad.getXMLConsolidada(marcas,cjto, publicaciones,diasA
ctualidad);^M
%>^M
<aranzadi:actual tipo="<%=tipo%>"><%=xml%></aranzadi:actual>^M
</cache:Cache>^M
<INPUT TYPE=HIDDEN NAME="nm" VALUE=""> ^M
<INPUT TYPE=HIDDEN NAME="saltoA" VALUE="">^M
<INPUT TYPE=HIDDEN NAME="saltoDe" VALUE="">^M
<!--INPUT TYPE=HIDDEN NAME="version" VALUE=""-->^M
</form>^M
^M
^M
</body>^M
^M
</html>^Mversion.
Can anybody hep me?
IdoiaSorry, the error is:
OracleJSP: oracle.jsp.parse.JspParseException: /WEB-INF/jsp/primary/./actualidad/./ultimosDocsLegisAutoyCalendario.jsp: Line # 199, <aranzadi:actual tipo="<%=tipo%>"><%=xml%></aranzadi:actual>
Error: actual must be terminated with /> or %> not >
Thanks, -
Why the oracle XML parser "parses" the DTD comments?
Hi all,
I always use the header
<?xml version = '1.0' encoding='ISO-8859-1' ?>
to be able to use foreign characters in the XML documents.
The oracle xml parser handles this correctly.
My problem is, when I write comments inside the DTD, the
parser reports "Invalid UTF8 encoding".
Why the parser "parse" the comments? (protected by <!-- and -->)
How do I say that the DTD encoding is different from UTF, like
ISO-8859-1?
Example of a correct DTD and corresponding XML, reporting
problems, related to the 2nd comment in the DTD specification,
written with ISO-8859-1 characters.
The DTD:
<!-- valid.dtd -->
<!ELEMENT valid ( B, C ) >
<!-- valid represents the concept "Identificagco" -->
<!ELEMENT B (#PCDATA) >
<!ELEMENT C (#PCDATA) >
The XML:
<?xml version = '1.0' encoding='ISO-8859-1' ?>
<!DOCTYPE valid SYSTEM 'valid.dtd'>
<valid>
<B>How are you, Conceigco</B>
<C>I'm fine, thank you.</C>
</valid>
The parser output:
[jgr@frontera test-dtd]$ java oracle.xml.parser.v2.oraxml -v
valid.xml
Error while parsing input sourcevalid.xml(Invalid UTF8 encoding.)
Thank you for any help.
Jorge Gustavo RochaI was wrong in saying that the attributes are not added to the element.My main aim is to add a array of elements to the root node.
Is there a efficient manner in adding the elements , rather than adding them individually with the help of appendChild method.
Thanks in advance.
null -
Oracle.jsp.parse.JavaCodeException
I have a jsp page, which I am trying to deploy to Webcenter, wls_portlet managed server.
UserName: <%= request.getRemoteUser() %> line in code is giving following error.
OracleJSP error: oracle.jsp.parse.JavaCodeException: Line # 29, oracle.jsp.parse.JspParseTagExpression@9debe6
Error: Java code in jsp source files is not allowed in ojsp.next mode.
can any body help, how to remove this problem.Nested Exception is javax.servlet.ServletException: OracleJSP error:
oracle.jsp.parse.JavaCodeException: Line # 8, oracle.jsp.parse.JspParseTagExpression@5d5c8f <br>Error: Java code in jsp source files is not allowed in ojsp.next mode.
at oracle.jsp.runtimev2.JspReportUtil.reportException(JspReportUtil.java:180)
at oracle.jsp.runtimev2.JspPageTable.compileAndServe(JspPageTable.java:692)
at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:722)
at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:646)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(RequestDispatcherImpl.java:499)
at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispatcherImpl.java:429)
at oracle.portlet.server.adapter.web.ServletExternalContext.include(ServletExternalContext.java:182)
at oracle.portlet.server.adapter.web.ServletExternalContext.includePath(ServletExternalContext.java:77)
at oracle.portlet.server.containerimpl.ServerContext.includePath(ServerContext.java:79)
at oracle.portlet.server.containerimpl.RequestDispatcherImpl.internalInclude(RequestDispatcherImpl.java:99)
at oracle.portlet.server.containerimpl.RequestDispatcherImpl.include(RequestDispatcherImpl.java:81)
at oracle.oardc.daps.ui.portlets.PA.doDispatch(PA.java:61)
at javax.portlet.GenericPortlet.render(GenericPortlet.java:163)
at oracle.portlet.server.containerimpl.ServerImpl.doRuntimeCall(ServerImpl.java:1283)
at oracle.portlet.server.containerimpl.ServerImpl.getMarkup(ServerImpl.java:142)
at oracle.portlet.server.containerimpl.ServerPerfLogger.getMarkup(ServerPerfLogger.java:584)
at oracle.portlet.wsrp.v2.WSRPv2VersionWrapperServer.getMarkup(WSRPv2VersionWrapperServer.java:545)
at oracle.portlet.wsrp.v2.WSRPv2ToServer.getMarkup(WSRPv2ToServer.java:2412)
at oracle.portlet.wsrp.v2.WSRP_v2_Markup_PortTypeSoapToJaxb.getMarkup(WSRP_v2_Markup_PortTypeSoapToJaxb.java:76)
at oracle.portlet.wsrp.v2.WSRP_v2_Markup_PortTypeSoapPerfLogger.getMarkup(WSRP_v2_Markup_PortTypeSoapPerfLogger.java:58)
at oasis.names.tc.wsrp.v2.bind.runtime.WSRP_v2_Markup_Binding_SOAP_Tie.invoke_getMarkup(WSRP_v2_Markup_Binding_SOAP_Tie.java:187)
at oasis.names.tc.wsrp.v2.bind.runtime.WSRP_v2_Markup_Binding_SOAP_Tie.processingHook(WSRP_v2_Markup_Binding_SOAP_Tie.java:1448)
at oracle.j2ee.ws.server.StreamingHandler.handle(StreamingHandler.java:299)
at oracle.j2ee.ws.server.JAXRPCProcessor.doEndpointProcessing(JAXRPCProcessor.java:421)
at oracle.j2ee.ws.server.WebServiceProcessor.invokeEndpointImplementation(WebServiceProcessor.java:873)
at oracle.j2ee.ws.server.JAXRPCProcessor.doRequestProcessing(JAXRPCProcessor.java:312)
at oracle.j2ee.ws.server.WebServiceProcessor.processRequest(WebServiceProcessor.java:202)
at oracle.j2ee.ws.server.JAXRPCProcessor.doService(JAXRPCProcessor.java:166)
at oracle.j2ee.ws.server.WebServiceServlet.doPost(WebServiceServlet.java:384)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.security.jps.wls.JpsWlsFilter$1.run(JpsWlsFilter.java:96)
at java.security.AccessController.doPrivileged(Native Method)
at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
at oracle.security.jps.wls.util.JpsWlsUtil.runJaasMode(JpsWlsUtil.java:146)
at oracle.security.jps.wls.JpsWlsFilter.doFilter(JpsWlsFilter.java:140)
at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:70)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.portlet.server.service.ContextFilter.doFilter(ContextFilter.java:101)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:159)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:202)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3588)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2200)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2106)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1428)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) -
Where do I get the oracle.jsp.dbutil library
Where do I get the oracle.jsp.dbutil library.
ThanksBernhard (guest) wrote:
: thanx for the advice. I think the links you posted will be
: helpful in the future.
: I found the source of my troubles on the SUSE homepage (ver 6.1
: does not use glibc 2.1).
: So now I needto find out how to upgrade to glibc 2.1
Upgrading to SuSe 6.2 would probably do the trick. Upgrade is
really smooth, and will take approximately 1h. I was able
to run oracle 8i client install on my PC and it works (32M,
160MHZ pentium) quite satisfactory. On my server machine
(450MHZ, 128MB) I'm running RH 6.0 and it also works fine.
On SuSe, I removed the "Kaffee" JVM installed by default and
downloaded JRE 1.1.7 from www.blackdown.org. I haven't tried
the "kaffe" engine but Oracle documentation requires blackdown.
Michael, if you read this, have you tried installing with the
default JVM engine delivered with SuSe 6.2?
As long as your operating system name doesn't start with "MS"
you should be OK.
: But first I will buy me a book about LINUX administration and
: hope to find the time reading it.
: Colin. (guest) wrote:
: : Bernhard (guest) wrote
: : : But anyway: This is my first try to install anything on
: LINUX.
: : : If anybody has some good advise for a rookie re.
: installation
: : : of ORACLE SERVER 8.15 on Linux I would be very thankful.
: : Try these links, there's lots of good tips to be found (and
: : thanks to the authors of these sites).
: : => A SuSE developers home page for Oracle.
: : www.suse.de/~mha/oracle/
: : => Install Guide for Redhat.
: : jordan.fortwayne.com/oracle/
: : => Oracle tips & scripts
: : www.akadia.com/html/dod-frame.html
: : amoeba.sagemediagroup.com/oracle_linux_howto/
: : www.orafaq.org/
: : www.oracle-dba.com/
: : www.kevinloney.com/
: : www.bf.rmit.edu.au/~orafaq/contents.html
: : www.lazydba.com/
: : www.dbasupport.com/
: : www.dbspecialists.com/
: : altern.org/place4oracle/oracle_contents.html
: : www.dbdomain.com
null -
The frustrating 'bug' of the oracle java page if you want 64 bit support.
gosh, i wish there were a way to simply contact the oracle webmaster/webdev team. there isn't, as far as i can find. here's what i just emailed to [email protected] figured i'd share it here, on the outside chance someone at oracle might know how to escalate this:
hi, this has frustrated me a number of times in the last year or two.
go to the main java download page:
http://www.java.com/en/download/manual.jsp
i want the 64 bit java plugin. hey, there's a link "information about the 64-bit java plug-in", yay! click it, it goes to
http://www.java.com/en/download/faq/java_win64bit.xml
<read a bit through it> ah, there towards the bottom of the page, "java for 64-bit browsers, with the following text and link:
"for downloading 64-bit java click 64-bit manual download". cool! click the link -
http://www.java.com/en/download/manual.jsp
it takes me right back to the main download page! it's an infinite loop!
i eventually just google, and type in 'jre-7u5-win' and it autocompletes to 'jre-7u5-widows-x64.exe download, and the first result returned is to the actual page needed:
http://www.oracle.com/technetwork/java/javase/downloads/jre7-downloads-1637588.html
is there any chance y'all could fix this? i'm sure i'm not the only person frustrated by the circular results the main download page provides.
thanks,
paulInteresting... I have now tested on various Windows versions with various browsers, including FF, IE, and Safari. I even tested on my iPhone. It appears that the page attempts to identify your platform and browser and displays differences in the page based on that result. So, for example, on my iPhone (in Safari) and Linux (with FF) where I know I can't use java or at least one for Windows, the page resembles what you described. However, on all my Windows machines (regardless of browser) the page displays properly.
So the questions to you is, are you doing this on a Windows machine or something else? If not Windows, this is why you are having the issue. If you want to download a Windows release while running a Linux, Mac, or other platform, you should use the method I described in my previous post of using java.sun.com then choosing Java SE under Top Downloads.
If you are on a Windows platform, but are seeing this issue, be sure your browser version is current and ensure that you do not have a security setting or security software which may be preventing this page from properly detecting your platforms.
Edited by: Michael Ferrante (Oracle) on Aug 1, 2012 9:58 AM -
Attribute parsing using the Oracle SAX Parser
I am trying to parse attributes like <Phone Type="N"> using the SAX xml parser from oracle in the startElement method and am getting a null pointer exception
public void startElement(String sName_, AttributeList attrs_) {
if sName_.equals("Phone")
String phoneType = attrs_.getValue("Type")
Any ideas ??
nullUsing 2.0.2.9, the following works for me:
import oracle.xml.parser.v2.*;
public class SAXParserExample {
public static void main(String[] a) throws Throwable {
SAXParser s = new SAXParser();
Handler h = new Handler();
s.setDocumentHandler(h);
s.parse(new java.io.StringReader("<Phone Type='N'/>"));
import org.xml.sax.*;
public class Handler extends HandlerBase {
public void startElement(String sName_, AttributeList attrs_) {
if (sName_.equals("Phone")) {
String phoneType = attrs_.getValue("Type");
System.out.println(phoneType);
}What's different about your case? -
Error in compilation - Bug in the Oracle Java Compiler ? (10.1.3)
I've the following situation :
I've a class wich extends ViewObjectImpl,named ClViewObjectImpl, and another class, named RbViewObjectImpl wich extends ClViewObjectImpl.
My classes have only a constructor with no parameters .
Compiling with standard Oracle complier I get the following error
Error: method $init$() in class oracle.jbo.server.RbViewObjectImpl cannot override method $init$() in class oracle.jbo.server.ClViewObjectImpl with weaker access privileges, was
Compiling with javacc it compiles.
Is it an bug ?
Is there any workaround ?
Tks
TullioRepost
-
Hello,
I am using Oracle SOA Suite 11.1.1.4.0 While executing the XQuery example bpel-108-UsingXQuery I am facing the following problem/error.
The Xquery in the example is:
xquery version "1.0";
declare namespace ns0 = "http://example.com/bpel/books";
declare namespace ns1 = "http://samples.otn.com/xquerysample";
declare variable $category as node() external;
declare variable $publisher as xs:string external;
<bookReport>
for $b in //ns0:BOOKS/ns0:ITEM
where data($b/ns0:PUBLISHER) = $publisher
order by string-length($b/TITLE) return
<book>
<author> { data($b/ns0:AUTHOR) } </author>
<title> { data($b/ns0:TITLE) } </title>
<price>{ data(doc("pricelist.xml")/ns1:pricelist/ns1:product[1]/ns1:price) }</price>
<publisher>{ $publisher }</publisher>
{ $category }
</book>
</bookReport>
The variable $publisher, declared in 'declare variable $publisher as xs:string external' shall have the value 'Associated Press' as this has been assigned in the BPEL but it has in fact the value 'oracle.xml.parser.v2.XMLElement@8b8e58'.
The variable $category has the correct value.
What is here wrong or is it a bug in 11.1.1.4.0 in the oracle.xml.parser.v2.XMLElement class.What a mess:
org.w3c.Element element = (org.w3c.Element) payload.get("payload");
private Document writeOraXMLtoDocument(org.w3c.Element payload) throws ParserConfigurationException, SAXException, IOException, TransformerException{
ByteArrayInputStream inputStream = new ByteArrayInputStream(writeXMLToStream(new DOMSource(payload)).toByteArray());
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder =factory.newDocumentBuilder();
return builder.parse(inputStream);
private ByteArrayOutputStream writeXMLToStream(Source source) throws TransformerException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
// Prepare the output file
Result result = new StreamResult(out);
// Write the DOM document to the file
TransformerFactory x = TransformerFactory.newInstance();
Transformer xformer = x.newTransformer();
xformer.transform(source, result);
return out;
Note, that you have to use the oracle transformer located in the xmlparserv2.jar
if it is not your default transformer , you have to set it at least for the above code by System.setProperty("javax.xml.transform.TransformerFactory","..classname..."); -
XML parsing problems with Oracle XML parser for PL/SQL
I am using the Oracle XML parser for PL/SQL to transform XML into HTML usign XSL. The parser gives me sporadic errors trying to parse various XML documents. For the same XML source, the XMLPARSER will parse without errors one day and the next day will give me errors such as "invalid char in text", "Expected ';'.", or even Java null pointer exceptions.
I have verified that the XML sources are well formed, so I am pretty certain that the problems I am having are bugs in the XMLPARSER.
Is there going to be a XML parser for PL/SQL version 2 that will fix these bugs? If so, when??? If not, is there anything else I could do to fix these problems?
Thanks!You can use the latest version.
Maybe you are looking for
-
How can i sync some songs into my iphone 4 without deleting everything else that's in my phone
i dont have songs on my iphone 4. so i downloaded some songs on my dell laptop n put them in itunes on my laptop when i tried sync-ing all the songs to my iphone 4. it says that all my apps will be deleted. how can i synce the songs into my iphone 4
-
I've replaced my 10.5.8 with another machine 10.6.8 which as we know doesn't support Apple Talk which has been used to print to 2 bulletproof older printers and an imagesetter. I wan't to keep using the printers and can use the 10.5.8 as a server. Wh
-
Expired Lot quantity incorrect in MRP Planner Workbench
Hello, We have an issue with Expired Lots in the planer workbench. - We have an Expired Lot of material in quantity 5000 pcs. - In MRP, the system should create an "Expired Lot" demand of 5000 pcs to net out the expired lot quantity from the beginnin
-
Download Scheduling ideas/Applications?
Hello everyone. I need advice/information on how to schedule downloads(of any variety) to take place between 2 AM and 8 AM to take advantage of my ISPs free download hours. If anyone has any ideas, suggestions, or potential applications I can use for
-
What happened to the CUPS printer drivers?
I have an older HP Inkjet that worked well with the printer drivers that were available (and still are if you look online) with the CUPS. Where have these driver's gone. Is MacOS going the way of Windows, where each new update breaks old working th