Cant resolve class on XSLT Extension

I have XSLT and I am trying to call a java method and I get
java.lang.NullPointerException
at oracle.xml.parser.v2.XSLExtFunctions.getClass(XSLExtFunctions.java:351)
Trying even a simple example using java.lang.xxxx gets the same error.
<!-- x.xsl: show value in Hexadecimal -->
<xsl:stylesheet version="1.0" exclude-result-prefixes="Int"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:Int="http://www.oracle.com/XSL/Transform/java/java.lang.Integer">
<xsl:template match="/">
<xsl:variable name="x" select="99"/>
<!-- Invoke public static toHexString() method on current node "." -->
<x-hex><xsl:value-of select="Int:toHexString($x)"/></x-hex>
</xsl:template>
</xsl:stylesheet>
This is XDK 9.2.0.6
Thanks in advance.

Terris Linenbach (guest) wrote:
: Does the v2 parser support XSLT extension functions?
: Here is a cool example of an implementation at
: http://www.jclark.com/xml/xt.html :
: A call to a function ns:foo where ns is bound to a namespace
of
: the form http://www.jclark.com/xt/java/className is treated as
a
: call of the static method foo of the class with fully-
qualified
: name className. Hyphens in method names are removed with the
: character following the hyphen being upper-cased. Overloading
: based on number of parameters is supported; overloading based
on
: parameter types is not. A non-static method is treated like a
: static method with the this object as an additional first
: argument. A constructor is treated like a static method named
: new. Extension functions can return objects of arbitrary types
: which can then be passed as arguments to other extension
: functions or stored in variables.
: For example, the following
: <xsl:stylesheet
: xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
: xmlns:date="http://www.jclark.com/xt/java/java.util.Date"
: xmlns="http://www.w3.org/TR/REC-html40"
: result-ns="">
: <xsl:template match="/">
: <html>
: <xsl:if test="function-available('date:to-string') and
: function-available('date:new')">
<xsl:value-of select="date:to-string(date:new
())"/></p>
: </xsl:if>
: </html>
: </xsl:template>
: </xsl:stylesheet>
: will print out the current date.
Our current release 2.0.2 does not support extension functions
but they will be supported in the very near future.
Oracle XML Team
http://technet.oracle.com
Oracle Technology Network
null

Similar Messages

  • Overloaded Java methods in XSLT extensions?

    Hello,
    when using Java classes as XSLT extensions, is it possible to use overloaded methods at all? I get "XSL-1042: Extension function error: Overloaded method 'format'" when doing that.
    I studied Steve Muench's book, pages 607-611, and came up with the following:
    Declared namespaces: "Date" for java.util.Date, "DateFormat" for java.text.DateFormat.
    Declared XSL variables: "now" as "Date:new()", "datefmt" as "DateFormat:getDateInstance()".
    Value of "Date:toString($now)" works fine. However, value of "DateFormat:format($datefmt, $now)" causes the XSL-1042 error.
    Is there any way around this?
    --Jere
    null

    The way around it is to create a wrapper function yourself that doesn't depend on overloading, and then exploit the overloading within your wrapper function call.

  • ESB XSLT Extension Functions

    Hi
    Could anybody tell me if we can use log4j in the java class which we write for XSLT Extension Functions which will be used in ESB XSL mappings?
    It is not recognizing log4j only.It is not giving any error also.
    Thanks
    Praveena

    Thanks Kanchan.
    This is talking about how to implement Extension functions.
    I have done this. but my question I am not able to use log4j for debugging purpose in this java class. It is not recognising this.
    We need to use logger instead of System.out.println .
    Thanks
    Praveena

  • MultiRowEdt-JBO-35000: Cant resolve spel expression for attribute {0}in{1}

    Hi All,
    i'm in the process of completing the mutli row edit tutorial that I downloaded from this site. I'm using 10.1.2, adf bc and jsp's.
    I've competed the tutorial and am getting an error JBO-35000: Cant resolve spel expression for attribute {0} in {1} .
    I've checked that my attribute names are the same as the VO and have created a BeanInfo class to handle the mapping of these attributes. All appears as it should, so not sure where to go from here.
    Any ideas would be gratefully received.
    Thanks in advance,
    Newbw

    hello,
    I'm facing the same problem in implementing mutli row edit tutorial.
    I'm using JDeveloper 9051.
    Can u please tell me how did u solve ur problem as i didnt understand what u've posted on forum "spelt my VO wrong".
    Please reply. waiting
    Thanks in advance
    Mina

  • Where to put property files used by XSLT extensions?

    Still fighting with Java XSLT extensions. I have narrowed the
    problem down: my XSLT extension cannot find its property file,
    which I use to store JDBC connect strings etc.
    What is the proper directory to put this file so the XSLT
    extension class can find it? I am using Oracle HTTP Server with
    XDK 9.0.

    Thanks for the answer, Steve!
    Depends on what call you're using in your extension function to
    read your properties.Maybe I tried a too simplistic approach. I'm just using this:
    Properties props = new Properties();
    try {
    props.load(new FileInputStream("/foo.properties"));
    etc.
    This (with the slash) works if the properties file is in the root
    directory of the filesystem, but it's a kludge.
    If you read your properties as a resource using
    getResourceAsStream(), then where the classloader expects to
    find your file depends on the resource name that you specify.So maybe I should use getResourceAsStream() then? What if I put
    the properties file inside the JAR with the extension classes?
    Or is there any way to reference the web root?
    --Jere

  • ABAP XSLT Extensions or XSLT (XI imported archive)?

    Hi all,
    I would like to know which is having better performance in a scenario with a significant number of messages.
    I know that ABAP XSLT Extensions is based in XSLT 1.0 and have some features of XSLT 2.0. So, for me it means some limitations and a disadvantage compared with all of XSLT 2.0 “standard” can offer.
    But, my question is related with performance and I just want to know which is faster.
    Thanks in advance,
    Cheers,
    Ricardo.

    Hi Ricardo,
    abap xslt has one great advantage
    abap stack does not have to communicate with
    java stack to perform the - so no RFC calls for mapping
    with many messages that might influence their flows
    but it wuold be best if you could just test it
    in YOUR environment (there are many test tools -
    like Loadrunner from Mercury) or you can write your own scripts
    and just test in your particular examle which one is better
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • Calling Java class in XSLT mapping

    Hi,
    how can we call a java class in XSLT mapping..
    thanks
    guna

    This is a good one too:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/8e7daa90-0201-0010-9499-cd347ffbbf72
    Found this one helpfull too
    http://www.cafeconleche.org/books/xmljava/chapters/ch17s03.html
    Christof

  • Cant resolve the host name in mac

    cant resolve your hostname then do the following work around:
    sudo vi /private/etc/hosts
    create the entry with IP and hostname ....no need of domain..

    cant resolve your hostname then do the following work around:
    sudo vi /private/etc/hosts
    create the entry with IP and hostname ....no need of domain..

  • Xslt extension

    I'm looking to write an Xslt extension to help produce Html-output. For part of the tags produced, some information in the Xml needs to be checked and the output changed accordingly. The idea I had was to dynamically add a piece of xsl to each stylesheet used. The question is rather simple: What's the "cleanest" way of writing a thing like this? So that there would be least possible "obscuration" of the code in the different stylesheets?
    Tommy Sedin

    Combining the XSLs isn't the problem. Calling the
    templates inside the "extension stylesheet" in a nice
    and clean way is. I hate having 4-5 lines of code to
    call a template, when it should be possible to have
    just 1.XML is a verbose language, isn't it?
    I appreciate your answers, but - as I said in my
    previous post - you're giving solutions to something
    that is already solved without even touching the
    problem I actually need help with. And I'm sorry if
    I'm making "smart ass comments", but I don't much
    appreciate you attacking my skills as a programmer and
    systems architect. There is a reason why I've solved
    something in a harder, more clumsy way than what
    everyone else does.Yes, people always have their reasons for doing things. And sometimes those reasons are bad reasons. Questioning a design is not an attack, it's just a question. So there's no need to take it personally. However, I really didn't read your first reply properly, and that didn't help.

  • Com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class..

    I create a enterprise application using jsf 2.0, ejb3, primefaces 2 and I want to show data in table immediately after ejb call findAll() method. But it's always appear: "can't instantiate class". Here is my code:
    index.xhtml
            <h:form>
                <p:dataTable id="tbl" var="p" value="#{Product.products}" >
                    <p:column>
                        <f:facet name="header">
                            Product Id
                        </f:facet>
                        <h:outputText value="#{p.productID}" />
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            Product Name
                        </f:facet>
                        <h:outputText value="#{p.productName}" />
                    </p:column>
                    <p:column>
                        <f:facet name="header">
                            Unit Price
                        </f:facet>
                        <h:outputText value="#{p.unitPrice}" />
                    </p:column>
                </p:dataTable>
            </h:form>
    package myEntity;
    @Entity
    @Table(name = "Products")
    @NamedQueries({
        @NamedQuery(name = "Products.*findAll*", query = "SELECT p FROM Products p"),
    public class Products implements Serializable {
        private static final long serialVersionUID = 1L;
        @Id
        @Basic(optional = false)
        @Column(name = "productID")
        private Integer productID;
        @Basic(optional = false)
        @Column(name = "productName")
        private String productName;
        @Basic(optional = false)
        @Column(name = "unitPrice")
        private double unitPrice;
        public Products() {
        public Products(Integer productID) {
            this.productID = productID;
        public Products(Integer productID, String productName, double unitPrice) {
            this.productID = productID;
            this.productName = productName;
            this.unitPrice = unitPrice;
        public Integer getProductID() {
            return productID;
        public void setProductID(Integer productID) {
            this.productID = productID;
        public String getProductName() {
            return productName;
        public void setProductName(String productName) {
            this.productName = productName;
        public double getUnitPrice() {
            return unitPrice;
        public void setUnitPrice(double unitPrice) {
            this.unitPrice = unitPrice;
    package mySessionBean;
    @Stateless
    public class ProductsFacade implements ProductsFacadeLocal {
        @PersistenceContext(unitName = "demoProduct-ejbPU")
        private EntityManager em;
        public List<Products> *findAll*() {
            CriteriaQuery cq = em.getCriteriaBuilder().createQuery();
            cq.select(cq.from(Products.class));
            return em.createQuery(cq).getResultList();
    package myManagedBean;
    @ManagedBean(name="Product")
    @RequestScoped
    public class Product {
        @EJB
        private ProductsFacadeLocal productsFacade;
        private List<Products> products;
        /** Creates a new instance of Product */
        public Product() {
            *products = productsFacade.findAll();*
        public List<Products> getProducts() {
            return products;
        public void setProducts(List<Products> products) {
            this.products = products;
    An Error Occurred:
    Cant instantiate class: myManagedBean.Product.
    +- Stack Trace
    com.sun.faces.mgbean.ManagedBeanCreationException: Cant instantiate class: myManagedBean.Product.
         at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:193)
    Caused by: java.lang.NullPointerException
         at myManagedBean.Product.<init>(Product.java:36)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
         at java.lang.Class.newInstance0(Class.java:355)
         at java.lang.Class.newInstance(Class.java:308)
         at com.sun.faces.mgbean.BeanBuilder.newBeanInstance(BeanBuilder.java:188)

    This is just baffling. The OP 'created' an enterprise application, but doesn't know the basics of the basics that is null-references? That is like knowing how to do your taxes without knowing how to add and subtract.

  • I have a Mac pro (10.7.5) and two PC's(windows 7). I am unable to ping either of PC through Mac. However Both PC's reply ping to each other and to Mac as well. Help me with this. Searched Internet. Cant resolve till now

    I have a MB pro (10.7.5) and two PC's(windows 7). I am unable to ping either of PC through Mac. However, Both PC's reply ping made to each other and to Mac as well. Help me with this. Searched Internet. Cant resolve till now
    Regards
    MacIts.

    Request timeout for icmp_seq 0
    Request timeout for icmp_seq 1
    Request timeout for icmp_seq 2
    Request timeout for icmp_seq 3
    Request timeout for icmp_seq 4
    Request timeout for icmp_seq 5
    Request timeout for icmp_seq 6
    is the reply m getting.

  • Error while resolving class. Help needed

    I've just installed J2SE JDK 5.0 under Ubuntu Linux 5.10. I used to have it installed under Ubuntu 5.04, and then I did not experience the problem I'm having now.
    I had no problems during the install, and I can compile all .java files I've tried. I can also run a simple program like this:
    class SimpleProgram {
        public static void main(String[] args) {
         String something = "Hello";
         System.out.println(something);
    //     System.out.println("Length: " + something.length());
         System.out.println(something.length());
    }but when I uncoment the line System.out.println("Length: " + something.length()); I get the following error when running the program (it compiles just fine though):
    snow@ubuntu:~/data/Java$ java SimpleProgram
    Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class: SimpleProgram
       at ._ZN4java4lang11VMThrowable16fillInStackTraceEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9Throwable16fillInStackTraceEv (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ThrowableC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5ErrorC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang12LinkageErrorC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang20NoClassDefFoundErrorC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang13VMClassLoader18transformExceptionEPNS0_5ClassEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)   at ._ZN4java4lang13VMClassLoader12resolveClassEPNS0_5ClassE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5Class15initializeClassEv (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5Class7forNameEPNS0_6StringEbPNS0_11ClassLoaderE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN3gnu4java4lang10MainThread3runEv (/usr/lib/libgcj.so.6.0.0)
       at ._Z13_Jv_ThreadRunPN4java4lang6ThreadE (/usr/lib/libgcj.so.6.0.0)
       at ._Z11_Jv_RunMainP14_Jv_VMInitArgsPN4java4lang5ClassEPKciPS6_b (/usr/lib/libgcj.so.6.0.0)
       at .main (/usr/lib/libgij.so.6.0.0)
       at .__libc_start_main (/lib/tls/i686/cmov/libc-2.3.5.so)
    Caused by: java.lang.ClassNotFoundException: java.lang.StringBuilder not found in gnu.gcj.runtime.SystemClassLoader{urls=[file:./,file:./], parent=gnu.gcj.runtime.ExtensionClassLoader{urls=[], parent=null}}
       at ._ZN4java4lang11VMThrowable16fillInStackTraceEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9Throwable16fillInStackTraceEv (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ThrowableC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ThrowableC1EPNS0_6StringEPS1_ (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang9ExceptionC1EPNS0_6StringEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang22ClassNotFoundExceptionC1EPNS0_6StringEPNS0_9ThrowableE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang22ClassNotFoundExceptionC1EPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java3net14URLClassLoader9findClassEPNS_4lang6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang11ClassLoader9loadClassEPNS0_6StringEb (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang11ClassLoader9loadClassEPNS0_6StringE (/usr/lib/libgcj.so.6.0.0)
       at ._Z13_Jv_FindClassP13_Jv_Utf8ConstPN4java4lang11ClassLoaderE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN4java4lang5Class7forNameEPNS0_6StringEbPNS0_11ClassLoaderE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN20_Jv_BytecodeVerifier21verify_instructions_0Ev (/usr/lib/libgcj.so.6.0.0)
       at ._Z16_Jv_VerifyMethodP16_Jv_InterpMethod (/usr/lib/libgcj.so.6.0.0)
       at ._ZN21_Jv_InterpreterEngine9do_verifyEPN4java4lang5ClassE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN10_Jv_Linker12verify_classEPN4java4lang5ClassE (/usr/lib/libgcj.so.6.0.0)
       at ._ZN10_Jv_Linker14wait_for_stateEPN4java4lang5ClassEi (/usr/lib/libgcj.so.6.0.0)
       ...8 moreI get this error with all class files I try to execute that aren't very basic. I've been searching this forum and Google, and the string "Exception in thread "main" java.lang.NoClassDefFoundError: while resolving class:" seems to be related to the class path. However that doesn't make sense to me in this case as I have no problem running the first example program. The .java and .class file is in the same directory (where it also was compiled), and typing "java -classpath . SimpleProgram" returns the same error.
    I hope someone can help me. I'd appreciate it

    I've solved it. I never found out what caused the error, but I installed Debian Sarge instead of Ubuntu 5.10 (not 'cause of this error though ...), and now everything works just fine =)

  • Sun VDI Web - Cant instantiate class: com.sun.vda.admin.AccordionBean..null

    Hi,
    I've installed VDI 3.1 on Solaris 10/09 in evaluation mode. I have absolutely no error during the install or the configuration. Once everything is completed, I can log locally on the VDA web console where I enter my username/password for root (the user that was used for the install). Once I do that, I have an "Internal Error Occured" that shows on the login page. If I click on the error log, I have the following:
    Error Details
    Here is a full stack trace of the error:org.apache.jasper.JasperException: javax.faces.FacesException: javax.faces.FacesException: javax.faces.FacesException: Cant instantiate class: com.sun.vda.admin.AccordionBean.. null
    at org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    === reduced for clarity ===
    at java.lang.Thread.run(Thread.java:595)
    Caused by: javax.faces.FacesException: javax.faces.FacesException: javax.faces.FacesException: Cant instantiate class: com.sun.vda.admin.AccordionBean.. null
    at com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.java:216)
    at javax.faces.webapp.UIComponentELTag.createComponent(UIComponentELTag.java:211)
    at javax.faces.webapp.UIComponentClassicTagBase.createChildRight now, all the services are running and status are good. However, I can't create provider with the CLI neither. I receive the message that VDI is not running (even if it is) and that's even if I commented out the localhost IPV6.
    I saw that the VDI Demo is not supported in a VM. Is that why or it should work even if not supported? My current VM has 3 GB of RAM and 2 CPU allocated to it which seems appropriate for a demo.
    If you have any idea or if I missed something, please let me know.
    Thank you.
    fortine

    Try executing:
    vda-webadmin stop
    vda-service stop
    vda-service start
    vda-webadmin start
    IIRC this worked for me some time back. If it doesn't work for you, check the DB state with vda-db-status
    ~Thomas

  • TS4057 Hi, i cant update fcpx because it doesn't appear in my purchased items in App store. macappstore support cant resolve me the problem; they certificate that i have purchased with order n mgk6by13.. on 21 06 2011, but nobody resolve me. I dont want r

    Hi, I'm aquamovie from italy, videoproducer, on 21 06 2011 i purchased fcp x but now it dont appears on my purchased items, so I cannot update to 10.0.3 because system says " you have not update for your software" :
    When i try to re dowload fcpx App store ask me to pay again!
    I have fcp x installed on two different mac.
    macappstore support cant resolve me the problem, they can see my order number, but send me to fcpx support.. here i cnat find a direct help, also tryed to speak whith itunes download and account, but no solutions, just " try to contact fcpx support"
    I don't want re-pay the software.. please have some ideas
    thanks
    aquamovie

    Are you sure that you have not hidden it ? If you go to you account in AppStore there is an option which says "reveal hidden" and have you try to tash FCPX and then go tu "purchases" you should be able to click install

  • Error jsp useBean  cant find class com.bloodoo.shoppingbasket

    I have an application which runs on my home Pc . It is a basic shopping cart app. I have Tomcat 4.1 and j2sdk1.4.2.
    When I transfered the application to Lunarpages my host , with the same folder structure I altered all the passwords and db connectors etc but when Itry to access the shop.jsp page I get the following error " useBean cant find class com.bloodoo.shoppingbasket " . I transferred the .java and .class files to Lunarpages.
    Do the .java files have to be compiled to .class files in the folder they wil be accessed ?
    If this is the case how are .java files compiled in a remote server?
    Any help very much appreciated .
    Thanks
    Jim Ascroft

    Hi there,
    I am using Tomcat on my home server and Lunarpages my web host uses Resin. I have not heard of resin and dont know if this would make any difference. All the folders and imports are ok on Tomcat at home and they are set up withy the same structure on Lunarpages.
    Any thoiughts ?
    Regards
    Jim Ascroft

Maybe you are looking for

  • Can't eject card reader!

    Greetings, I have a compact flash card reader (USB 2) that i plugged into the USB slot on the front of my MacPro. I copied the wanted photos over to my hard drive, used the "eject" button from the Finder window to eject the card reader.... and it dis

  • QuickTime X does not play QuickTime Broadcaster recordings

    This is a post I'm leaving for other SL upgraders who come looking for information on why their QuickTIme Broadcaster .mov files and other QuickTime files such as .m4v for iPod that don't play on QuickTime X but do play on iTunes and QT 7. I'm findin

  • Internal and External application tier File move

    Hi all, I am new oracle apps R12 with 3 tier instance. We are created the oracle apps R12 instance with 3 tier. Two tier is Application tier and one tier is Database tier. The data base tier is common for both application tier. The issue is, we are m

  • Com.onlinebackup.daemon.plist conflict with Aperture 3

    I had an ongoing issue where the active Aperture 3 window (mostly, but sometimes even other app's active windows) would suddenly no longer be the active, highlighted window. This was particularly aggrevating when culling through images, selecting sev

  • HT4623 I cannot find the update section under Settings. What do I do?

    I cannot find the update section under Settings. What do I do?