Re: [hibernate-dev] Invoking hbm2java without using Ant
what is the stacktrace ? -max > Hi, > > Wondering if you can help me here. > > I have a hibernate.reveng.xml file which contains some tables. I want to > generate mappings and POJOs for those tables that are in the reveng.xml file > without using Ant. > > Here is how my code looks like: > > String fileName = "hibernate.reveng.xml"; > JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration(); > cfg.configure(); > OverrideRepository or = new OverrideRepository(); > or.addResource(fileName); > cfg.setReverseEngineeringStrategy(or.getReverseEngineeringStrategy(new > DefaultReverseEngineeringStrategy())); > > But I am getting java.lang.ExceptionInInitializerError at > JDBCMetaDataConfiguration cfg = new JDBCMetaDataConfiguration(); > > Any idea why I am getting an error there ? > > Thanks > > > > > > > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Invoking hbm2java without using Ant
Here you go: I have all the required jars added to the project. Those include commons-logging-1.0.4jar, hibernate2.jar, hibernate-tools.jar, hibernate-annotations.jar, dom4j-1.6.1.jar etc... org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385) Caused: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) Caused: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.) (Caused by org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed. (Caused by org.apache.commons.logging.LogConfigurationException: Invalid class loader hierarchy. You have more than one version of 'org.apache.commons.logging.Log' visible, which is not allowed.)) at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) at org.hibernate.cfg.Configuration.(Configuration.java:120) Caused: java.lang.ExceptionInInitializerError at org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.buildFiles(HibernateRevengWizard.java:250) at org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.instantiate(HibernateRevengWizard.java:237) at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1025) at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:595) at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:416) at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:248) at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:161) at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1387) at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1341) at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119) at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1908) at org.openide.WizardDescriptor$Listener$2.run(WizardDescriptor.java:1957) at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1316) at org.openide.WizardDescriptor.access$1200(WizardDescriptor.java:119) at org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1964) Caused: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:449) Caused: java.lang.reflect.UndeclaredThrowableException at $Proxy22.actionPerformed(Unknown Source) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236) at java.awt.Component.pr
Re: [hibernate-dev] Invoking hbm2java without using Ant
The exception says it all. You seem to have multiple commons-logging classes on the class path. /max > Here you go: > > I have all the required jars added to the project. Those include > commons-logging-1.0.4jar, hibernate2.jar, hibernate-tools.jar, > hibernate-annotations.jar, dom4j-1.6.1.jar etc... > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > hierarchy. You have more than one version of 'org.apache.commons.logging.Log' > visible, which is not allowed. > at > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385) > Caused: org.apache.commons.logging.LogConfigurationException: > org.apache.commons.logging.LogConfigurationException: Invalid class loader > hierarchy. You have more than one version of 'org.apache.commons.logging.Log' > visible, which is not allowed. (Caused by > org.apache.commons.logging.LogConfigurationException: Invalid class loader > hierarchy. You have more than one version of 'org.apache.commons.logging.Log' > visible, which is not allowed.) > at > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397) > at > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) > Caused: org.apache.commons.logging.LogConfigurationException: > org.apache.commons.logging.LogConfigurationException: > org.apache.commons.logging.LogConfigurationException: Invalid class loader > hierarchy. You have more than one version of 'org.apache.commons.logging.Log' > visible, which is not allowed. (Caused by > org.apache.commons.logging.LogConfigurationException: Invalid class loader > hierarchy. You have more than one version of 'org.apache.commons.logging.Log' > visible, which is not allowed.) (Caused by > org.apache.commons.logging.LogConfigurationException: > org.apache.commons.logging.LogConfigurationException: Invalid class loader > hierarchy. You have more than one version of 'org.apache.commons.logging.Log' > visible, which is not allowed. (Caused by > org.apache.commons.logging.LogConfigurationException: Invalid class loader > hierarchy. You have more than one version of 'org.apache.commons.logging.Log' > visible, which is not allowed.)) > at > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543) > at > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) > at > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) > at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) > at org.hibernate.cfg.Configuration.(Configuration.java:120) > Caused: java.lang.ExceptionInInitializerError > at > org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.buildFiles(HibernateRevengWizard.java:250) > at > org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.instantiate(HibernateRevengWizard.java:237) > at > org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1025) > at > org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:595) > at > org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:416) > at > org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:248) > at > org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:161) > at > org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1387) > at > org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1341) > at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119) > at > org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1908) > at > org.openide.WizardDescriptor$Listener$2.run(WizardDescriptor.java:1957) > at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1316) > at org.openide.WizardDescriptor.access$1200(WizardDescriptor.java:119) > at > org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1964) > Caused: java.lang.reflect.InvocationTargetException > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:585) > at > org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:449) > Caused: java.lang.reflect.UndeclaredThrowableException > at $Proxy22.actionPerformed(Unknown Source) > at > javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849) > at > javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169) > at > javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:
Re: [hibernate-dev] Invoking hbm2java without using Ant
So is this what causing the java.lang.ExceptionInInitializerError while trying to instantiate JDBCMetaDataConfiguration ? --- Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: > The exception says it all. You seem to have multiple commons-logging classes > on the class path. > > /max > > > Here you go: > > > > I have all the required jars added to the project. Those include > > commons-logging-1.0.4jar, hibernate2.jar, hibernate-tools.jar, > > hibernate-annotations.jar, dom4j-1.6.1.jar etc... > > > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > > hierarchy. You have more than one version of > 'org.apache.commons.logging.Log' > > visible, which is not allowed. > > at > > > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385) > > Caused: org.apache.commons.logging.LogConfigurationException: > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > > hierarchy. You have more than one version of > 'org.apache.commons.logging.Log' > > visible, which is not allowed. (Caused by > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > > hierarchy. You have more than one version of > 'org.apache.commons.logging.Log' > > visible, which is not allowed.) > > at > > > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397) > > at > > > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) > > Caused: org.apache.commons.logging.LogConfigurationException: > > org.apache.commons.logging.LogConfigurationException: > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > > hierarchy. You have more than one version of > 'org.apache.commons.logging.Log' > > visible, which is not allowed. (Caused by > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > > hierarchy. You have more than one version of > 'org.apache.commons.logging.Log' > > visible, which is not allowed.) (Caused by > > org.apache.commons.logging.LogConfigurationException: > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > > hierarchy. You have more than one version of > 'org.apache.commons.logging.Log' > > visible, which is not allowed. (Caused by > > org.apache.commons.logging.LogConfigurationException: Invalid class loader > > hierarchy. You have more than one version of > 'org.apache.commons.logging.Log' > > visible, which is not allowed.)) > > at > > > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543) > > at > > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) > > at > > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) > > at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) > > at org.hibernate.cfg.Configuration.(Configuration.java:120) > > Caused: java.lang.ExceptionInInitializerError > > at > > > org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.buildFiles(HibernateRevengWizard.java:250) > > at > > > org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.instantiate(HibernateRevengWizard.java:237) > > at > > > org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1025) > > at > > > org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:595) > > at > > > org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:416) > > at > > > org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:248) > > at > > > org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:161) > > at > > > org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1387) > > at > org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1341) > > at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119) > > at > org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1908) > > at > > org.openide.WizardDescriptor$Listener$2.run(WizardDescriptor.java:1957) > > at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1316) > > at org.openide.WizardDescriptor.access$1200(WizardDescriptor.java:119) > > at > > > org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1964) > > Caused: java.lang.reflect.InvocationTargetException > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > > at > > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:585) > > at > > > org.openide.util.WeakListenerImpl$ProxyListener.invoke(WeakListenerImpl.java:449) > > Caused: java.lang.reflect.Undecla
Re: [hibernate-dev] Invoking hbm2java without using Ant
That is what the exception says. /max > So is this what causing the java.lang.ExceptionInInitializerError while trying > to instantiate JDBCMetaDataConfiguration ? > > > --- Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: > >> The exception says it all. You seem to have multiple commons-logging classes >> on the class path. >> >> /max >> >> > Here you go: >> > >> > I have all the required jars added to the project. Those include >> > commons-logging-1.0.4jar, hibernate2.jar, hibernate-tools.jar, >> > hibernate-annotations.jar, dom4j-1.6.1.jar etc... >> > >> > org.apache.commons.logging.LogConfigurationException: Invalid class loader >> > hierarchy. You have more than one version of >> 'org.apache.commons.logging.Log' >> > visible, which is not allowed. >> >at >> > >> > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:385) >> > Caused: org.apache.commons.logging.LogConfigurationException: >> > org.apache.commons.logging.LogConfigurationException: Invalid class loader >> > hierarchy. You have more than one version of >> 'org.apache.commons.logging.Log' >> > visible, which is not allowed. (Caused by >> > org.apache.commons.logging.LogConfigurationException: Invalid class loader >> > hierarchy. You have more than one version of >> 'org.apache.commons.logging.Log' >> > visible, which is not allowed.) >> >at >> > >> > org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:397) >> >at >> > >> > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529) >> > Caused: org.apache.commons.logging.LogConfigurationException: >> > org.apache.commons.logging.LogConfigurationException: >> > org.apache.commons.logging.LogConfigurationException: Invalid class loader >> > hierarchy. You have more than one version of >> 'org.apache.commons.logging.Log' >> > visible, which is not allowed. (Caused by >> > org.apache.commons.logging.LogConfigurationException: Invalid class loader >> > hierarchy. You have more than one version of >> 'org.apache.commons.logging.Log' >> > visible, which is not allowed.) (Caused by >> > org.apache.commons.logging.LogConfigurationException: >> > org.apache.commons.logging.LogConfigurationException: Invalid class loader >> > hierarchy. You have more than one version of >> 'org.apache.commons.logging.Log' >> > visible, which is not allowed. (Caused by >> > org.apache.commons.logging.LogConfigurationException: Invalid class loader >> > hierarchy. You have more than one version of >> 'org.apache.commons.logging.Log' >> > visible, which is not allowed.)) >> >at >> > >> > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543) >> >at >> > >> > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235) >> >at >> > >> > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209) >> >at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351) >> >at org.hibernate.cfg.Configuration.(Configuration.java:120) >> > Caused: java.lang.ExceptionInInitializerError >> >at >> > >> > org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.buildFiles(HibernateRevengWizard.java:250) >> >at >> > >> > org.netbeans.modules.hibernate.wizards.HibernateRevengWizard.instantiate(HibernateRevengWizard.java:237) >> >at >> > >> > org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1025) >> >at >> > >> org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:595) >> >at >> > >> > org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:416) >> >at >> > >> > org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:248) >> >at >> > >> > org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:161) >> >at >> > >> org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1387) >> >at >> org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1341) >> >at org.openide.WizardDescriptor.access$1600(WizardDescriptor.java:119) >> >at >> org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:1908) >> >at >> > org.openide.WizardDescriptor$Listener$2.run(WizardDescriptor.java:1957) >> >at org.openide.WizardDescriptor.lazyValidate(WizardDescriptor.java:1316) >> >at org.openide.WizardDescriptor.access$1200(WizardDescriptor.java:119) >> >at >> > >> > org.openide.WizardDescriptor$Listener.actionPerformed(WizardDescriptor.java:1964) >> > Caused: java.lang.reflect.InvocationTargetException >> >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> >at >> > >> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) >> >at >> > >> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) >> >at java.lang.reflect.Method.inv
[hibernate-dev] Sync maven jboss repo with central repo?
The jboss maven repo is not currently being sync'd to the central repo for the org/hibernate packages. I need the latest entitytManager which is no in central but is in the jboss repo. I can't just add the jboss repository in my pom because our 'production' builds are done on a special build server that is behind a firewall and is only allowed access to the maven central repo for security reasons. Big Brother is very paranoid. Besides, adding another repo slows down developer builds since that extra repo has to be checked for artifacts in addition to central. Instructions on how to request the sync can be found here: http://maven.apache.org/guides/mini/guide-central-repository-upload.html ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Sync maven jboss repo with central repo?
The sync process in on someone's todo list at JBoss. But todo lists are long these days. On May 14, 2008, at 12:49, Tomislav Stojcevich wrote: The jboss maven repo is not currently being sync'd to the central repo for the org/hibernate packages. I need the latest entitytManager which is no in central but is in the jboss repo. I can't just add the jboss repository in my pom because our 'production' builds are done on a special build server that is behind a firewall and is only allowed access to the maven central repo for security reasons. Big Brother is very paranoid. Besides, adding another repo slows down developer builds since that extra repo has to be checked for artifacts in addition to central. Instructions on how to request the sync can be found here: http://maven.apache.org/guides/mini/guide-central-repository-upload.html ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Sync maven jboss repo with central repo?
Just a comment: I never understood how a community global repository is considered more trustworthy than some other repository. Note that i'm not saying the jboss repo is more trustworthy. btw. the way to use multiple repositories is to setup a proxy maven repository that does the syncing for you - and you control the content. Just my 2$ ;) /max > The sync process in on someone's todo list at JBoss. But todo lists > are long these days. > > > On May 14, 2008, at 12:49, Tomislav Stojcevich wrote: > >> The jboss maven repo is not currently being sync'd to the central repo >> for the org/hibernate packages. >> >> I need the latest entitytManager which is no in central but is in the >> jboss repo. >> >> I can't just add the jboss repository in my pom because our >> 'production' builds are done on a special build server that is behind >> a firewall and is only allowed access to the maven central repo for >> security reasons. Big Brother is very paranoid. Besides, adding >> another repo slows down developer builds since that extra repo has to >> be checked for artifacts in addition to central. >> >> Instructions on how to request the sync can be found here: >> http://maven.apache.org/guides/mini/guide-central-repository-upload.html >> ___ >> hibernate-dev mailing list >> hibernate-dev@lists.jboss.org >> https://lists.jboss.org/mailman/listinfo/hibernate-dev > > ___ > hibernate-dev mailing list > hibernate-dev@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/hibernate-dev > ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
Re: [hibernate-dev] Sync maven jboss repo with central repo?
On Wed, May 14, 2008 at 4:37 PM, Max Rydahl Andersen <[EMAIL PROTECTED]> wrote: > Just a comment: I never understood how a community global repository is > considered > more trustworthy than some other repository. > The number of users/reviewers? who controls its contents? how long it's been around? how long it's going to be around? possible considerations > > btw. the way to use multiple repositories is to setup a proxy maven repository > that does the syncing for you - and you control the content. > yes, i use a proxy locally but it wont matter on the build server since all internet traffic is blocked except for the maven central repo ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev
[hibernate-dev] remove object from collection without collection fetching
Hello, I have bi-directional association between parent/child. Parent can have too many children and I want to add and remove to "children" (inverse=true) collection without loading collection. "children" collection mapped as . With adding to collection I have no problem, but when I try to remove from this collection, collection perform initialization. Java class: public class MyObject { private Long id; private MyObject parent; private Collection< MyObject > children = new ArrayList< MyObject >(); public MyObject() { } public void addChild( MyObject object ) { object.parent = this; children.add( object ); } public void removeChild( KAObject object ) { object.parent = null; children.remove( object ); // initialization of collection. it is strange, because too many children. } } Database: table: my_object fields: - id - parent_id Mapping: my_object_seq column="parent_id" lazy="no-proxy" cascade="evict" access="field" /> cascade="all-delete-orphan" access="field"> I want for example move child to another parent. MyObject newParent = session.get(MyObject.class, 1); MyObject child = session.get(MyObject.class, 2); MyObject oldParent = myObject.getParent(); oldParent.removeChild(child); // initialization of collection. it is strange, because too many children. newParent.addChild(child) // no initialization Why PersistentBag.remove is not implemented like PersistentBag.add ? public boolean add(Object object) { if ( !isOperationQueueEnabled() ) { write(); return bag.add(object); } else { queueOperation( new SimpleAdd(object) ); return true; } } public boolean remove(Object o) { initialize( true ); if ( bag.remove( o ) ) { dirty(); return true; } else { return false; } } I think problem, that interface of Collection.remove(Object) should return result of remove. But what aboutm if I never use this result. I can write own implementation of PersistentBag with overrided method remove. and use it in User Collection Type. public boolean remove( Object o ) { if ( !isOperationQueueEnabled() ) { write(); return bag.remove( o ); } else { queueOperation( new SimpleRemove( o ) ); return true; // this result can be wrong } } final class SimpleRemove implements DelayedOperation { private Object value; public SimpleRemove(Object value) { this.value = value; } public void operate() { bag.remove(value); } public Object getAddedInstance() { return null; } public Object getOrphan() { return value; } } In this implementation I should always remember, that result of Collection.remove(Object) can be wrong and never use it. May be anybody know another solution? ___ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev