You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hivemind.apache.org by Robin Ericsson <lo...@gmail.com> on 2006/04/25 22:05:30 UTC

Classloading problems

Hi,

I'm trying to get Hivetranse running with a Tapestry project. Given
that I'm new to both Tapestry and HiveMind I've run into some problem
that seems to be related to classpath/loading.

I've setup Eclipse together with WTP using this page:
http://wiki.apache.org/jakarta-tapestry/HowToSetupEclipseWtp and I've
have no problems with Tapestry alone. The problems started after I've
tried to get Hivetranse running. The missing configuration point that
it complains about is found in my applications hivemodule.xml.

The exception I get when I run this through Tomcat (5.5.16) inside Eclipse is:
org.apache.hivemind.ApplicationRuntimeException: Error at
jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
line 20, column 59: Configuration point
hivetranse.core.TransactionDefaults contains no contributions but
expects exactly one contribution.
   location: jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
line 20, column 59
org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
org.apache.hivemind.impl.RegistryInfrastructureConstructor.checkContributionCounts(RegistryInfrastructureConstructor.java:678)
org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistryInfrastructure(RegistryInfrastructureConstructor.java:180)
org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:151)
org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.java:253)
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)

However, running this through JBoss 4.0.3 it works as it should (No
idea of Tomcat version shipped with JBoss)

Any ideas where I should start to look for problems?


regards,
        Robin

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Classloading problems

Posted by Achim Hügen <ac...@gmx.de>.
Sorry, I just realized that you are using the eclipse Web Tools Platform.
I'm not familiar with the classpath definition in this case.
Where is your hivemodule.xml located and how is that location
included into the classpath?

Achim

Am Tue, 25 Apr 2006 23:11:16 +0200 schrieb Achim Hügen  
<ac...@gmx.de>:

> What does mean 'Tomcat inside eclipse'?
> Do you use any plugin like sysdeo?
>
> Achim
>
> Am Tue, 25 Apr 2006 22:05:30 +0200 schrieb Robin Ericsson  
> <lo...@gmail.com>:
>
>> Hi,
>>
>> I'm trying to get Hivetranse running with a Tapestry project. Given
>> that I'm new to both Tapestry and HiveMind I've run into some problem
>> that seems to be related to classpath/loading.
>>
>> I've setup Eclipse together with WTP using this page:
>> http://wiki.apache.org/jakarta-tapestry/HowToSetupEclipseWtp and I've
>> have no problems with Tapestry alone. The problems started after I've
>> tried to get Hivetranse running. The missing configuration point that
>> it complains about is found in my applications hivemodule.xml.
>>
>> The exception I get when I run this through Tomcat (5.5.16) inside  
>> Eclipse is:
>> org.apache.hivemind.ApplicationRuntimeException: Error at
>> jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
>> line 20, column 59: Configuration point
>> hivetranse.core.TransactionDefaults contains no contributions but
>> expects exactly one contribution.
>>    location:  
>> jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
>> line 20, column 59
>> org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
>> org.apache.hivemind.impl.RegistryInfrastructureConstructor.checkContributionCounts(RegistryInfrastructureConstructor.java:678)
>> org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistryInfrastructure(RegistryInfrastructureConstructor.java:180)
>> org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:151)
>> org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.java:253)
>> org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
>>
>> However, running this through JBoss 4.0.3 it works as it should (No
>> idea of Tomcat version shipped with JBoss)
>>
>> Any ideas where I should start to look for problems?
>>
>>
>> regards,
>>         Robin
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Classloading problems

Posted by Achim Hügen <ac...@gmx.de>.
What does mean 'Tomcat inside eclipse'?
Do you use any plugin like sysdeo?

Achim

Am Tue, 25 Apr 2006 22:05:30 +0200 schrieb Robin Ericsson  
<lo...@gmail.com>:

> Hi,
>
> I'm trying to get Hivetranse running with a Tapestry project. Given
> that I'm new to both Tapestry and HiveMind I've run into some problem
> that seems to be related to classpath/loading.
>
> I've setup Eclipse together with WTP using this page:
> http://wiki.apache.org/jakarta-tapestry/HowToSetupEclipseWtp and I've
> have no problems with Tapestry alone. The problems started after I've
> tried to get Hivetranse running. The missing configuration point that
> it complains about is found in my applications hivemodule.xml.
>
> The exception I get when I run this through Tomcat (5.5.16) inside  
> Eclipse is:
> org.apache.hivemind.ApplicationRuntimeException: Error at
> jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
> line 20, column 59: Configuration point
> hivetranse.core.TransactionDefaults contains no contributions but
> expects exactly one contribution.
>    location:  
> jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
> line 20, column 59
> org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39)
> org.apache.hivemind.impl.RegistryInfrastructureConstructor.checkContributionCounts(RegistryInfrastructureConstructor.java:678)
> org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistryInfrastructure(RegistryInfrastructureConstructor.java:180)
> org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.java:151)
> org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.java:253)
> org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
>
> However, running this through JBoss 4.0.3 it works as it should (No
> idea of Tomcat version shipped with JBoss)
>
> Any ideas where I should start to look for problems?
>
>
> regards,
>         Robin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Classloading problems

Posted by "Brian K. Wallace" <br...@transmorphix.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robin Ericsson wrote:
> On 4/26/06, Brian K. Wallace <br...@transmorphix.com> wrote:
>> Or something must be wrong... ;-) [it's ending up in the wrong META-INF]
> 
> I only have one META-INF.
> 
>> If you put it in WEB-INF/, or WEB-INF/classes/META-INF you should be
>> fine. (I just committed a note in the documentation for Tapestry on
>> where it will find hivemodule.xml files and load them.)
> 
> In hivetranse.core.jar it's located in
> hivetranse.core.jar!/META-INF/hivemodule.xml, should I be able to put
> in Application.war/META-INF/hivemodule.xml then?
Unfortunately, no. It would either need to be in a jar's (not war's)
META-INF, or in the war's WEB-INF/ or the war's WEB-INF/classes/META-INF
(there are a couple other places, but they all feed off of WEB-INF/ in
the war)

> 
> As I said in the first mail, it works in JBoss, but fails in the basic
> Tomcat through Eclipse.
> 
> regards,
>         Robin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFETxYsaCoPKRow/gARAl6TAJwOH1kOmg0Nati36+pwho7D85vXcQCgh3Br
XroBObDcbngdWReuPbuQ3Pg=
=6prj
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Classloading problems

Posted by Robin Ericsson <lo...@gmail.com>.
On 4/26/06, Felix Sun <su...@gmail.com> wrote:
> It seems like JBoss make Application.war/ as a classpath item If it works.
> while Tomcat through Eclipse not.
> the hivemodule.xml could be find in any classpath item or jar's META-INF
> directory by default in hivemind.
>  but Tapestry add some other special dir for looking up hivemodule.xml ,
> such as WEB-INF/, WEB-INF/application-name/ etc.

Ok, sounds like an idea of the problem. But where is the META-INF
supposed to be? In / or in WEB-INF/classes?

I guess that just add /META-INF to classpath would solve the problem,
I'll try tonight.


regards,
        Robin

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Classloading problems

Posted by Felix Sun <su...@gmail.com>.
It seems like JBoss make Application.war/ as a classpath item If it works.
while Tomcat through Eclipse not.
the hivemodule.xml could be find in any classpath item or jar's META-INF
directory by default in hivemind.
but Tapestry add some other special dir for looking up hivemodule.xml , such
as WEB-INF/, WEB-INF/application-name/ etc.

Felix Sun

On 4/25/06, Robin Ericsson <lo...@gmail.com> wrote:
>
> On 4/26/06, Brian K. Wallace <br...@transmorphix.com> wrote:
> > Or something must be wrong... ;-) [it's ending up in the wrong META-INF]
>
> I only have one META-INF.
>
> > If you put it in WEB-INF/, or WEB-INF/classes/META-INF you should be
> > fine. (I just committed a note in the documentation for Tapestry on
> > where it will find hivemodule.xml files and load them.)
>
> In hivetranse.core.jar it's located in
> hivetranse.core.jar!/META-INF/hivemodule.xml, should I be able to put
> in Application.war/META-INF/hivemodule.xml then?
>
> As I said in the first mail, it works in JBoss, but fails in the basic
> Tomcat through Eclipse.
>
> regards,
>         Robin
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
>
>

Re: Classloading problems

Posted by Robin Ericsson <lo...@gmail.com>.
On 4/26/06, Brian K. Wallace <br...@transmorphix.com> wrote:
> Or something must be wrong... ;-) [it's ending up in the wrong META-INF]

I only have one META-INF.

> If you put it in WEB-INF/, or WEB-INF/classes/META-INF you should be
> fine. (I just committed a note in the documentation for Tapestry on
> where it will find hivemodule.xml files and load them.)

In hivetranse.core.jar it's located in
hivetranse.core.jar!/META-INF/hivemodule.xml, should I be able to put
in Application.war/META-INF/hivemodule.xml then?

As I said in the first mail, it works in JBoss, but fails in the basic
Tomcat through Eclipse.

regards,
        Robin

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Classloading problems

Posted by "Brian K. Wallace" <br...@transmorphix.com>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Or something must be wrong... ;-) [it's ending up in the wrong META-INF]

If you put it in WEB-INF/, or WEB-INF/classes/META-INF you should be
fine. (I just committed a note in the documentation for Tapestry on
where it will find hivemodule.xml files and load them.)

Brian

Robin Ericsson wrote:
> On 4/26/06, James Carman <ja...@carmanconsulting.com> wrote:
>> Turn up your debugging.  It'll tell you when it's actually finding your
>> module and adding it to the registry.  If you don't see it in the debug
>> statements, then it's not on the classpath.  As Achim asked, where is your
>> hivemodule.xml file?  Are you putting it in WEB-INF or
>> WEB-INF/classes/META-INF or inside a jar's META-INF directory?  Those are
>> the only locations that will be loaded automatically by HiveMind/Tapestry.
> 
> It's inside META-INF, but META-INF is a toplevel exploded war folder
> together with WEB-INF, not inside WEB-INF/classes. The funny thing is
> that it works in JBoss so something must be right :)
> 
> 
> regards,
> Robin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: hivemind-user-help@jakarta.apache.org
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (MingW32)

iD8DBQFETwwXaCoPKRow/gARAgbOAKD3O5ohyywqoZGBQ7QbBh6jsHK4mgCgq7du
QE+xjFASdBEEMp/GxTNTkdM=
=mwsW
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


Re: Classloading problems

Posted by Robin Ericsson <lo...@gmail.com>.
On 4/26/06, James Carman <ja...@carmanconsulting.com> wrote:
> Turn up your debugging.  It'll tell you when it's actually finding your
> module and adding it to the registry.  If you don't see it in the debug
> statements, then it's not on the classpath.  As Achim asked, where is your
> hivemodule.xml file?  Are you putting it in WEB-INF or
> WEB-INF/classes/META-INF or inside a jar's META-INF directory?  Those are
> the only locations that will be loaded automatically by HiveMind/Tapestry.

It's inside META-INF, but META-INF is a toplevel exploded war folder
together with WEB-INF, not inside WEB-INF/classes. The funny thing is
that it works in JBoss so something must be right :)


regards,
Robin

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org


RE: Classloading problems

Posted by James Carman <ja...@carmanconsulting.com>.
Turn up your debugging.  It'll tell you when it's actually finding your
module and adding it to the registry.  If you don't see it in the debug
statements, then it's not on the classpath.  As Achim asked, where is your
hivemodule.xml file?  Are you putting it in WEB-INF or
WEB-INF/classes/META-INF or inside a jar's META-INF directory?  Those are
the only locations that will be loaded automatically by HiveMind/Tapestry.



-----Original Message-----
From: Robin Ericsson [mailto:lobbin@gmail.com] 
Sent: Tuesday, April 25, 2006 4:06 PM
To: hivemind-user@jakarta.apache.org
Subject: Classloading problems

Hi,

I'm trying to get Hivetranse running with a Tapestry project. Given
that I'm new to both Tapestry and HiveMind I've run into some problem
that seems to be related to classpath/loading.

I've setup Eclipse together with WTP using this page:
http://wiki.apache.org/jakarta-tapestry/HowToSetupEclipseWtp and I've
have no problems with Tapestry alone. The problems started after I've
tried to get Hivetranse running. The missing configuration point that
it complains about is found in my applications hivemodule.xml.

The exception I get when I run this through Tomcat (5.5.16) inside Eclipse
is:
org.apache.hivemind.ApplicationRuntimeException: Error at
jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps
/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
line 20, column 59: Configuration point
hivetranse.core.TransactionDefaults contains no contributions but
expects exactly one contribution.
   location:
jar:file:/C:/xxx/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps
/Tidrapport/WEB-INF/lib/hivetranse.core.jar!/META-INF/hivemodule.xml,
line 20, column 59
org.apache.hivemind.impl.StrictErrorHandler.error(StrictErrorHandler.java:39
)
org.apache.hivemind.impl.RegistryInfrastructureConstructor.checkContribution
Counts(RegistryInfrastructureConstructor.java:678)
org.apache.hivemind.impl.RegistryInfrastructureConstructor.constructRegistry
Infrastructure(RegistryInfrastructureConstructor.java:180)
org.apache.hivemind.impl.RegistryBuilder.constructRegistry(RegistryBuilder.j
ava:151)
org.apache.tapestry.ApplicationServlet.constructRegistry(ApplicationServlet.
java:253)
org.apache.tapestry.ApplicationServlet.init(ApplicationServlet.java:194)
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:11
05)

However, running this through JBoss 4.0.3 it works as it should (No
idea of Tomcat version shipped with JBoss)

Any ideas where I should start to look for problems?


regards,
        Robin

---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: hivemind-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: hivemind-user-help@jakarta.apache.org