ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | xmlc List | April 2002 Index

<--  Date Index  --> <--  Thread Index  -->

AW: Xmlc: I've some problems with xmlc and BEA Weblogic Server 6 .1


Title: RE: Xmlc: I've some problems with xmlc and BEA Weblogic Server 6 .1
you mean
 
sh xmlc -class com.lwplus.chainnet.vmi.servlet.html.htmlgui.LoginHtml -extends MissingMethods -keep -nocompile -dom xerces  -sourceout D:/work/ Login.html
 
I already do. And I still get this exception
 
-----Ursprüngliche Nachricht-----
Von: Mergaerts, Peter [JanBe] [mailto:PMERGAER@xxxxxxxxxxxxx]
Gesendet: Montag, 22. April 2002 10:41
An: 'xmlc@xxxxxxxxxxx'
Betreff: RE: Xmlc: I've some problems with xmlc and BEA Weblogic Server 6 .1

OK, and if you combine the -extends MissingMethods  and the -dom xerces options with XMLC2.0.1?
-----Original Message-----
From: mhanel@xxxxxxxxx [mailto:mhanel@xxxxxxxxx]
Sent: Monday, 22 April 2002 10:30
To: xmlc@xxxxxxxxxxx
Subject: AW: Xmlc: I've some problems with xmlc and BEA Weblogic Server 6 .1

building the .java with xmlc I'm using the compileoption -extends MissingMethods
Missing Methods is a class which contains the methods
 
    public boolean hasAttributes()
    public boolean isSupported(String p0, String p1)
 
So I can have the weblogic.jar in front of the xmlc.jar.
during compilation.
Now my problem is, that I can't get xmlc2.0.1 to run.
It just works with xmlc1.3 on my machine. (but there I dont't have the -dom parameter)
If I'm using 2.0.1 I get the NoSuchMethodError during runtime.
I can compile everything but when I'm starting my loginservlet nothing works, for no reason why.
 
 
java.lang.NoSuchMethodError: org.enhydra.xml.xmlc.dom.XMLCDomFactoryCache: method getFactory(Ljava/lang/Class;)Lorg/enhydra/xml/xmlc/dom/XMLCDomFactory; not found
 at com.lwplus.chainnet.vmi.servlet.html.htmlgui.LoginHtml.<clinit>(LoginHtml.java:71)
 at com.lwplus.chainnet.vmi.servlet.Login.doGet(Login.java:115)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
 at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
 at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
 at java.lang.Thread.run(Thread.java:484)
 
My code is still the same.
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    {
 
        //setting the contenttype
        res.setContentType(CONTENT_TYPE);
 
        //get the compressed printwriter
        PrintWriter out = getCompressedPrintWriter(req,res);
 
        LoginHtmlMod mod = new LoginHtmlMod(req.getLocale(),NAME);
        mod.modificate();
        out.println(mod.getHtml());
 
        //close the outputstream
        out.close();
    }
 
 

-----Ursprüngliche Nachricht-----
Von: Mergaerts, Peter [JanBe] [mailto:PMERGAER@xxxxxxxxxxxxx]
Gesendet: Montag, 22. April 2002 09:51
An: 'xmlc@xxxxxxxxxxx'
Betreff: RE: Xmlc: I've some problems with xmlc and BEA Weblogic Server 6 .1

Yes, but this is solved by using another classpath when compiling and using the -dom xerces option for XMLC. The compile classpath should have xmlc.jar before weblogic.jar, the deployed .ear file can have xmlc.jar in the web-inf/lib directory.
-----Original Message-----
From: mhanel@xxxxxxxxx [mailto:mhanel@xxxxxxxxx]
Sent: Monday, 22 April 2002 09:37
To: xmlc@xxxxxxxxxxx
Subject: AW: Xmlc: I've some problems with xmlc and BEA Weblogic Server 6 .1

But when I use xmlc2.0.1 instead of xmlc1.3 i get an NoSuchMethodError.
 
java.lang.NoSuchMethodError: org.enhydra.xml.xmlc.dom.XMLCDomFactoryCache: method getFactory(Ljava/lang/Class;)Lorg/enhydra/xml/xmlc/dom/XMLCDomFactory; not found
 at com.lwplus.chainnet.vmi.servlet.html.htmlgui.LoginHtml.<clinit>(LoginHtml.java:71)
 at com.lwplus.chainnet.vmi.servlet.Login.doGet(Login.java:115)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
 at org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
 at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:160)
 at org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338)
 at java.lang.Thread.run(Thread.java:484)
 
My code is still the same.
    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    {
 
        //setting the contenttype
        res.setContentType(CONTENT_TYPE);
 
        //get the compressed printwriter
        PrintWriter out = getCompressedPrintWriter(req,res);
 
        LoginHtmlMod mod = new LoginHtmlMod(req.getLocale(),NAME);
        mod.modificate();
        out.println(mod.getHtml());
 
        //close the outputstream
        out.close();
    }
 
-----Ursprüngliche Nachricht-----
Von: Mergaerts, Peter [JanBe] [mailto:PMERGAER@xxxxxxxxxxxxx]
Gesendet: Montag, 22. April 2002 06:15
An: 'xmlc@xxxxxxxxxxx'
Betreff: RE: Xmlc: I've some problems with xmlc and BEA Weblogic Server 6 .1

We use WLS6.1SP with xmlc2.0.1. Take a look at: http://www.jguru.com/forums/view.jsp?EID=780966

-----Original Message-----
From: mhanel@xxxxxxxxx [mailto:mhanel@xxxxxxxxx]
Sent: Friday, 19 April 2002 10:17
To: xmlc@xxxxxxxxxxx
Subject: AW: Xmlc: I've some problems with xmlc and BEA Weblogic Server
6 .1


My servlet's work just fine under Tomcat 4.0
but when I try to start them with BEA WLS 6.1
I always get a NullpointerException in the toDocument() method.

I'm using xmlc 1.3 cause for some unknown reason xmlc 2 doesn't work on my
machine.
And in the classpath the weblogic.jar must be in front of the xmlc.jar.


Here is my Stacktrace          

<19.04.2002 08:15:31 CEST> <Error> <HTTP>
<[WebAppServletContext(2102968,vmi,/vmi)] Servlet failed with Exception
java.lang.NullPointerException
        at
org.apache.xml.serialize.OutputFormat.whichMethod(OutputFormat.java:872)
        at
org.enhydra.xml.io.DOMFormatter.getFormatter(DOMFormatter.java:93)
        at org.enhydra.xml.io.DOMFormatter.toString(DOMFormatter.java:109)
        at
org.enhydra.xml.xmlc.html.HTMLObjectImpl.toDocument(HTMLObjectImpl.java:70)
        at
com.lwplus.chainnet.vmi.servlet.html.LoginHtmlMod.getHtml(LoginHtmlMod.java:
131)
        at com.lwplus.chainnet.vmi.servlet.Login.doGet(Login.java:104)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:265)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2495)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2204)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>

And my code is

public class Login extends BaseSrvlt
{
    private static final String CONTENT_TYPE = "text/html";
    public static final String NAME = "Login";

    public void doGet(HttpServletRequest req, HttpServletResponse res)
    throws ServletException, IOException
    {
        //setting the contenttype
        res.setContentType(CONTENT_TYPE);

        //get the compressed printwriter
        PrintWriter out = getCompressedPrintWriter(req,res);

        LoginHtmlMod mod = new LoginHtmlMod(req.getLocale(),NAME);
        mod.modificate();
        out.println(mod.getHtml());

        //close the outputstream
        out.close();
    }
}

LoginHtml is the .java file which was generated by xmlc.

public class LoginHtmlMod extends LoginHtml
{
    private ResourceBundle LanguageUsers = null;
    private String NAME = null;

    public LoginHtmlMod(Locale Locale, String servletName)
    {
        super();

        //language
        LanguageUsers = ResourceBundle.getBundle(
ResourceClass.class.getName(),
                                                  Locale);
        //System.out.println("Get the name of the Servlet");
        NAME = servletName;
    }

    public void modificate()
    {
        //set the action and method attribute of the form
        HTMLFormElement form = getElementForm();
        form.setAction(NAME);
        form.setMethod("post");
        //set the loginnametext
        HTMLTableCellElement login = getElementLogin();
        login.replaceChild(createTextNode(
 
LanguageUsers.getString(ResourceClass.LAB_LOGIN))
                                ,login.getLastChild());
...
lots of replacings
...

        //set the headtableline
        HTMLTableCellElement tableheadline = getElementLoginwnd();
        tableheadline.replaceChild(createTextNode(
 
LanguageUsers.getString(ResourceClass.LAB_LOGINWND))
                                ,tableheadline.getLastChild());
    }

    public String getHtml()
    throws IOException
    {
        //DOMFormatter formatter = new DOMFormatter();
        //formatter.write(this, out);
        return toDocument();
    }
}

That I can have the weblogic.jar in front of the xmlc.jar (in classpath).
My compiled (LoginHtml.java) file is extending a Class which contains the
hasAttributes
and  isSupported methods.
Otherwise the compiler is throwing an Should be declared abstract exception.

    public boolean hasAttributes()
    public boolean isSupported(String p0, String p1)




Right now my colleague is trying to get the servlets in his jBuilder
running, but it throws almost the same
error than on our server.

java.lang.NullPointerException
            at
org.apache.xml.serialize.OutputFormat.whichMethod(OutputFormat.java:872)
            at
org.enhydra.xml.io.DOMFormatter.getFormatter(DOMFormatter.java:93)
            at
org.enhydra.xml.io.DOMFormatter.toString(DOMFormatter.java:109)
            at
org.enhydra.xml.xmlc.html.HTMLObjectImpl.toDocument(HTMLObjectImpl.java:70)
            at
com.lwplus.chainnet.vmi.servlet.html.LoginHtmlMod.getHtml(LoginHtmlMod.java:
131)
            at com.lwplus.chainnet.vmi.servlet.Login.doGet(Login.java:119)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
            at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
            at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
            at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:160)
            at
org.apache.tomcat.service.TcpConnectionThread.run(SimpleTcpEndpoint.java:338
)
            at java.lang.Thread.run(Thread.java:484)


-----Ursprüngliche Nachricht-----
Von: James Graves [mailto:jgraves@xxxxxxxxxxxxxxx]
Gesendet: Donnerstag, 18. April 2002 16:54
An: mhanel@xxxxxxxxx
Betreff: Re: Xmlc: I've some problems with xmlc and BEA Weblogic Server
6.1



You'll need to post a stack trace, at the very least.  Otherwise it is
next to impossible to help.

James Graves, CTO
Delta Mobile Software                           http://www.deltamobile.com
_______________________________________________
XMLC mailing list
XMLC@xxxxxxxxxxx
http://www.enhydra.org/mailman/listinfo.cgi/xmlc



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.