« Return to Thread: MyFaces Tree2 Component

Re: MyFaces Tree2 Component

by Grzesiek-4 :: Rate this Message:

Reply to Author | View in Thread

first of all, thanks for you help...

<?xml version='1.0' encoding='UTF-8'?>

<!-- =========== FULL CONFIGURATION FILE ================================== -->

<faces-config version="1.2"
    xmlns="http://java.sun.com/xml/ns/javaee"
.....

It still gives an error :
SEVERE: Parse Error at line 2 column 14: Document root element "faces-config", must match DOCTYPE root "null".
org.xml.sax.SAXParseException: Document root element "faces-config", must match DOCTYPE root "null".

(2)
> So the MyfacesConfig class is present in the tomahawk 1.1.6 jarfile.

Yes, I also checked this and 'org.apache.myfaces.shared_tomahawk.config.MyfacesConfig' class is where it should be. So this is strange....

following exception:
javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.myfaces.shared_tomahawk.config.MyfacesConfig

is caused by this line In my web.xml :
<filter-class>org.apache.myfaces.webapp.filter.ExtensionsFilter</filter-class>


I consider that it would be a bug somewhere, but never mind.
At least i'll have to change my JSF implementation, because with myfaces it works.

Anyway if you don't know how to solve this exception, i don't want waste your time....

regards

2008/4/21, simon.kitching@... <simon.kitching@...>:
We should really use a different thread for this issue. However...

Item (1) just looks like a plain old bug in tomahawk. Could you please
post the first few lines of your faces-config.xml file?

I don't know why (2) is happening for you...

sk@*****:~/.m2/repository/org/apache/myfaces/tomahawk/tomahawk/1.1.6>
jar tf tomahawk-1.1.6.jar| grep MyfacesConfig
org/apache/myfaces/shared_tomahawk/config/MyfacesConfig.class

So the MyfacesConfig class is present in the tomahawk 1.1.6 jarfile. The
problem must therefore be that some class it depends on cannot be found
(NoClassDefFound errors are a pain to track down, due to insufficient
info from Sun's JVM). Is there anything more useful in the stacktrace?


Just FYI, Tomahawk 1.1.7-SNAPSHOT definitely can be run on Sun's RI. If you

(1)
check out the tomahawk examples:
  http://svn.apache.org/repos/asf/myfaces/tomahawk/trunk/examples

(2)
  add the apache snapshot repo to your ~/.m2/settings.xml file

(3)
type
  cd examples/simple
  mvn -Djsf=ri12 jetty:run

then the examples will start up using the sun RI, and can be accessed via
  http://localhost:8080

I'm not aware of any reason why 1.1.6 would not also run (though the
latest examples code needs 1.1.7)

Regards,
Simon


Grzesiek schrieb:

> Yes, that is what should be. But in my case JSF Mojarra + Tomahawk
> causes a lot of problems, eg :
>
> 1. First (but it doesn't matter):
> 2008-04-21 13:22:02 org.apache.commons.digester.Digester error
> SEVERE: Parse Error at line 5 column 14: Document root element
> "faces-config", must match DOCTYPE root "null".
> org.xml.sax.SAXParseException: Document root element "faces-config",
> must match DOCTYPE root "null".
>
> when faces-config.xml is successfully validated and in 100% is good.
>
> 2. My real problem is this exception:
>
> 2008-04-21 13:29:52 org.apache.myfaces.webapp.filter.ExtensionsFilter
> doFilter
> SEVERE: Exception wile retrieving addResource
> javax.servlet.ServletException: java.lang.NoClassDefFoundError: Could not initialize class org.apache.myfaces.shared_tomahawk.config.MyfacesConfig
> (but the same project + MyFaces + Tomahawk works perfect). This
> exception takes place when I try to add `Tomahawk-1.6.jar` to my
> projet with jsf-api.jar and jsf-impl.jar from SUN JSF.
> I need Tomahawk for e.g files upload.
>
> Regards
>

> 2008/4/21, simon.kitching@... <mailto:simon.kitching@...>
> <simon.kitching@... <mailto:simon.kitching@...>>:

>
>     This isn't correct; Tomahawk can be used with any JSF
>     implementation, eg
>     Sun's.
>
>     In very old Tomahawk versions, you needed to add a "shared" jar if you
>     weren't using myfaces but that was removed long ago.
>
>     Regards,
>     Simon
>
>     Grzesiek schrieb:
>
>     > Personally I regret tomahawk can't be used without myfaces
>     > (dependencies on `_shared` jars).
>
>


 « Return to Thread: MyFaces Tree2 Component