I suggest you upgrade to Java 7, it works perfectly with no compatibility 
issues, and is a lot faster.But, if you insist on not doing it, you can look at 
the source code and figure out how it works.It's not that much code.John  
wrote:> Thanks for this library.> > I tried the FlowLogix 1.1.7 
library with my Tapestry 5.3.6 project and get this on jetty startup:> > 
java.lang.UnsupportedClassVersionError: 
com/flowlogix/web/services/ServicesModul> e : Unsupported major.minor 
version 51.0>         at java.lang.ClassLoader.defineClass1(Native 
Method)>         at 
java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)>         at 
java.lang.ClassLoader.defineClass(ClassLoader.java:616)>         at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14> 
1)>         at 
java.net.URLClassLoader.defineClass(URLClassLoader.java:283)>         at 
java.net.URLClassLoader.access$000(URLClassLoader.java:58)>         at 
java.net.URLClassLoader$1.run(URLClassLoader.java:197)>         at 
java.security.AccessController.doPrivileged(Native Method)>         at 
java.net.URLClassLoader.findClass(URLClassLoader.java:190)>         at 
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade> 
r.java:392)>         at 
org.mortbay.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoade> 
r.java:363)>         at java.lang.Class.forName0(Native Method)>         
at java.lang.Class.forName(Class.java:247)>         at 
org.apache.tapestry5.ioc.RegistryBuilder.add(RegistryBuilder.java:157> )> 
        at 
org.apache.tapestry5.ioc.IOCUtilities.addModulesInList(IOCUtilities.j> 
ava:137)>         at 
org.apache.tapestry5.ioc.IOCUtilities.addModulesInManifest(IOCUtiliti> 
es.java:107)>         at 
org.apache.tapestry5.ioc.IOCUtilities.addDefaultModules(IOCUtilities.> 
java:77)>         at 
org.apache.tapestry5.internal.TapestryAppInitializer.<init>(TapestryA> 
ppInitializer.java:124)>         at 
org.apache.tapestry5.TapestryFilter.init(TapestryFilter.java:103)>         
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)>     
    at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:> 
50)>         at 
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.ja> 
va:653)>         at 
org.mortbay.jetty.servlet.Context.startContext(Context.java:140)> >   
----- Original Message ----- >   From: Lenny Primak >   To: Tapestry 
users >   Sent: Monday, November 12, 2012 3:39 PM>   Subject: Re: 
tapestry-jpa entities not associated with correct entity manager> > >  
 Yes, I have multiple PUs working correctly, using Glassfish and the FlowLogix 
library:> >   Here are some references:>   
http://code.google.com/p/flowlogix/wiki/TLPersistenceRegistry> > >   
On Nov 12, 2012, at 6:56 AM, John wrote:> >   > This did not work 
either, even though the config code is called! Has anyone got multiple 
persistence units working please, if so how?>   > >   > 
@Contribute(EntityManagerSource.class)>   > public static void 
configurePersistenceUnitInfos(>   >   MappedConfiguration<String, 
PersistenceUnitConfigurer> cfg,>   >   final Logger log) {>   >  
PersistenceUnitConfigurer jabberConfigurer = new PersistenceUnitConfigurer() 
{>   >   public void configure(TapestryPersistenceUnitInfo unitInfo) 
{>   >    
unitInfo.addManagedClass(com.audit.manager.jabber.entities.JabberUser.class);>
   >    log.info("JabberDBUnit classes added");>   >   }>   >  
};>   >  cfg.add("JabberDBUnit", jabberConfigurer);>   >  
PersistenceUnitConfigurer auditConfigurer = new PersistenceUnitConfigurer() 
{>   >   public void configure(TapestryPersistenceUnitInfo unitInfo) 
{>   >    
unitInfo.addManagedClass(com.audit.manager.audit.entities.ValidateUsernameBean.class);>
   >    
unitInfo.addManagedClass(com.audit.manager.audit.entities.UsersWhoCanLogIn.class);>
   >    log.info("AuditDBUnit classes added");>   >   }>   >  
};>   >  cfg.add("AuditDBUnit", auditConfigurer);>   > }>   > 
>   > [ERROR] TapestryModule.RequestExceptionHandler Processing of 
request failed with>   > uncaught exception: Unknown entity bean class: 
class com.audit.manager.audit>   > .entities.UsersWhoCanLogIn, please 
verify that this class has been marked with t>   > he @Entity 
annotation.>   > org.apache.tapestry5.runtime.ComponentEventException: 
Unknown entity bean class:>   > class 
com..audit.manager.audit.entities.UsersWhoCanLogIn, please verify that>   
> this class has been marked with the @Entity annotation. [at 
classpath:com./aud>   > it/manager/pages/Login.tml, line 7]>   > 
>   > package com.audit.manager.audit.entities;>   > >   > 
import java.io.Serializable;>   > >   > import 
javax.persistence.Column;>   > import javax.persistence.Entity;>   
> import javax.persistence.Id;>   > import 
javax.persistence.Table;>   > >   > @Entity>   > @Table(name 
= "v_UsersWhoCanLogIn")>   > public class UsersWhoCanLogIn implements 
Serializable {>   > >   > private static final long 
serialVersionUID = 803545730972339902L;>   > >   > @Id>   > 
@Column(name = "username")>   > private String username;>   >  
----- Original Message ----- >   >  From: Lenny Primak >   >  To: 
Tapestry users >   >  Cc: Tapestry users >   >  Sent: Sunday, 
November 11, 2012 4:30 PM>   >  Subject: Re: tapestry-jpa entities not 
associated with correct entity manager>   > >   > >   >  I 
would suggest either using or looking at FlowLogix tapestry library>   >  
It has a jpa package that takes care of using multiple persistence units in one 
application. >   >  The key is to have entities with different PUs in 
different packages. >   > >   >  On Nov 11, 2012, at 3:49 AM, 
"John" <j...@quivinco.com> wrote:>   > >   >> I'm finding 
that entities are not being attached to the correct entity manager even though 
they are indicated in the persistence.xml.>   >> >   >> This 
manifests that if the user logs in first which uses AuditDBUnit then the 
entities in JabberDBUnit are not available. If the JabberDBUnit is used first, 
entities are not available from the other units.>   >> >   >> 
Is there a way to ensure the entities associate with the right persistence 
units?>   >> >   >> regards,>   >> John>   
>> >   >> <?xml version="1.0" encoding="UTF-8"?>>   
>> <persistence xmlns="http://java.sun.com/xml/ns/persistence"; 
version="2.0">>   >> >   >>  <persistence-unit 
name="JabberDBUnit" transaction-type="RESOURCE_LOCAL">>   >>      
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>>
   >>      
<class>com..audit.manager.entities.JabberUser</class>>   
>>      <properties>>   >>         <property 
name="javax.persistence.jdbc.driver"     value="org.postgresql.Driver" 
/>>   >>         <property name="javax.persistence.jdbc.url"     
   value="jdbc:postgresql://212.95.225.52:5432/jsm" />>   >>        
 <property name="javax.persistence.jdbc.user"       value="com." />>   
>>         <property name="javax.persistence.jdbc.password"   
value="com." />>   >>         <property 
name="eclipselink.logging.level"         value="fine"/>>   >>     
</properties>>   >>  </persistence-unit>>   >> 
>   >>  <persistence-unit name="AuditDBUnit" 
transaction-type="RESOURCE_LOCAL">>   >>      
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>>
   >>      
<class>com..audit.manager.entities.ValidateUsernameBean</class>> 
  >>      
<class>com..audit.manager.entities.UsersWhoCanLogIn</class>>   
>>      <properties>>   >>         <property 
name="javax.persistence.jdbc.driver"     
value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />>   >>       
  <property name="javax.persistence.jdbc.url"        
value="jdbc:sqlserver://212.95.225.51:1433;databaseName=eAudit" />>   
>>         <property name="javax.persistence.jdbc.user"       
value="webserver" />>   >>         <property 
name="javax.persistence.jdbc.password"   value="epu1s3" />>   >>    
     <property name="eclipselink.logging.level"         
value="fine"/>>   >>     </properties>>   >>  
</persistence-unit>>   >> >   >>  <persistence-unit 
name="IMAuditDBUnit" transaction-type="RESOURCE_LOCAL">>   >>      
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>>
   >>      <properties>>   >>         <property 
name="javax.persistence.jdbc.driver"     
value="com.microsoft.sqlserver.jdbc.SQLServerDriver" />>   >>       
  <property name="javax.persistence.jdbc.url"        
value="jdbc:sqlserver://212.95.225.51:1433;databaseName=eIMAudit" />>   
>>         <property name="javax.persistence.jdbc.user"       
value="webserver" />>   >>         <property 
name="javax.persistence.jdbc.password"   value="epu1s3" />>   >>    
     <property name="eclipselink.logging.level"         
value="fine"/>>   >>     </properties>>   >>  
</persistence-unit>>   >> >   >> 
</persistence>>   > >   >  
--------------------------------------------------------------------->   
>  To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org>   >  
For additional commands, e-mail: users-h...@tapestry.apache.org> > >   
--------------------------------------------------------------------->   To 
unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org>   For additional 
commands, e-mail: users-h...@tapestry.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to