Creates a new Object but this object already existing.
esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transitionControlPanel(CHelpdeskChannel.java:493) at org.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transitionAuthenticated(CHelpdeskChannel.java:374) at org.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transition(CHelpdeskChannel.java:321) at org.esupportail.portal.channels.CJDOChannel.setRuntimeData(CJDOChannel.java:404) at org.jasig.portal.ChannelRenderer$Worker.run(ChannelRenderer.java:412) at org.jasig.portal.utils.threading.Worker.run(Worker.java:88) Caused by: java.sql.SQLException: Invalid argument value, message from server: "Duplicata du champ '1' pour la clef 1" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1876) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1098) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1192) at com.mysql.jdbc.Connection.execSQL(Connection.java:2051) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:197) ... 22 more -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creates a new Object but this object already existing.
.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transitionTakeTicket(CHelpdeskChannel.java:1009) at org.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transitionControlPanel(CHelpdeskChannel.java:493) at org.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transitionAuthenticated(CHelpdeskChannel.java:374) at org.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transition(CHelpdeskChannel.java:321) at org.esupportail.portal.channels.CJDOChannel.setRuntimeData(CJDOChannel.java:404) at org.jasig.portal.ChannelRenderer$Worker.run(ChannelRenderer.java:412) at org.jasig.portal.utils.threading.Worker.run(Worker.java:88) Caused by: java.sql.SQLException: Invalid argument value, message from server: "Duplicata du champ '1' pour la clef 1" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1876) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1098) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1192) at com.mysql.jdbc.Connection.execSQL(Connection.java:2051) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:197) ... 22 more -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Creates a new Object but this object already existing.
esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transitionControlPanel(CHelpdeskChannel.java:493) at org.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transitionAuthenticated(CHelpdeskChannel.java:374) at org.esupportail.portal.channels.CHelpdesk.CHelpdeskChannel.transition(CHelpdeskChannel.java:321) at org.esupportail.portal.channels.CJDOChannel.setRuntimeData(CJDOChannel.java:404) at org.jasig.portal.ChannelRenderer$Worker.run(ChannelRenderer.java:412) at org.jasig.portal.utils.threading.Worker.run(Worker.java:88) Caused by: java.sql.SQLException: Invalid argument value, message from server: "Duplicata du champ '1' pour la clef 1" at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1876) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1098) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1192) at com.mysql.jdbc.Connection.execSQL(Connection.java:2051) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1680) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1527) at org.apache.ojb.broker.accesslayer.JdbcAccessImpl.executeInsert(JdbcAccessImpl.java:197) ... 22 more -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDO and using multiple jcd-alias
Hi, I have two applications which using 2 different databases. I have a single repository.xml file with two and with two different ccd-alias tag. With PB and ODMG api, we can use this jcd-alias to differentiate the connection. What is the equivalent method with JDO. Anyone can help me ? Best regards, Alexandre. -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
JDO and using multiple jcd-alias
Hi, I have two applications which using 2 different databases. I have a single repository.xml file with two and with two different ccd-alias tag. With PB and ODMG api, we can use this jcd-alias to differentiate the connection. What is the equivalent method with JDO. Anyone can help me ? Best regards, Alexandre. -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [JDO] JDO and application server.
Thanks Pedro, Yes, Currently, I use a single persistance manager for each user. I create it in the constructor and close it after the session is done. I will try to create a PM for each job. Alexandre. Pedro Salgado wrote: On 04/05/10 9:58, "Alexandre BOISSEAU" <[EMAIL PROTECTED]> wrote: Hi, We are developing an application server (a uPortal channel) and we use OJB-JDO in order to implement data persistence. Everything works fine when the application is accessed by one user. But as soon as the application is concurrently accessed by two (or more) users, multiple instances are created and then, it seems that persistent managers (i.e. PersistenceManager instances) are not bound to the correct user. I think you shouldn't keep an instance of persistence manager for each user. If you want you may keep a persistence manager factory instead. I usually create persistence managers, do the job I want with them and then close them in the end (try - catch - finally {if (pm!= null) pm.close();}). Pedro Salgado - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[JDO] JDO and application server.
Hi, We are developing an application server (a uPortal channel) and we use OJB-JDO in order to implement data persistence. Everything works fine when the application is accessed by one user. But as soon as the application is concurrently accessed by two (or more) users, multiple instances are created and then, it seems that persistent managers (i.e. PersistenceManager instances) are not bound to the correct user. Anybody already encountered this problem? Thanks, Alexandre -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Problem with OJB-JDO plugin and proxy classes
Hi, I have problems when using proxy class : With the tutorial example : Loading of Article objects for a given ProductGroup works correctly, but when I try to load Article objects only, the search always returns nothing. Removing proxy from Article class-descriptor fixes the problem (search works correctly). Any suggestions? Thanks in advance, Alexandre -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[JDO] Can I use a proxy with the JDO implementation ?]
Hi, I have to deal with large objects with OJB and I sense I will get into trouble with some performance issues if data is loaded each time objects are created. I saw some examples using the org.apache.ojb.broker.VirtualProxy class but I don’t manage to… Anybody having had such experience? Regards, -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[JDO] Can I use a proxy with the JDO implementation ?
Hi, I would like tu use a proxy to manipulate my objects (wich contains BLOB). Is this use is possible with JDO ? Maybe with the org.apache.ojb.broker.VirtualProxy ? Thanks in advance, Alexandre. Excuse my bad English ;-). -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Problem setting up OJB using ojb-blank
Hi, Did you explicitly put in the classpath: - the directory where find the properties files (repository*, OJB.properties ...) - possibly, the directory where you build your classes. Often, it's a solution to resolve much problems. Regards, Alexandre Fiona Magner wrote: Hi there: I'm a newbie trying to get started with OJB. I have created ojb-blank to start a new project. However in this new project I have tried to set up a simple application using the PersistenceBorkerFactory and also using ODMG. With each I am getting an error complaining that the class for org.apache.ojb.tutorial1.product cannot be found. I have removed all references to these tutorial classes in the repository_***.xml files and also removed references to junit and jdo and ejb in repository.xml. However I am still getting this problem :( I would appreciate any help you would have on the problem. Here is part of the error that I get (it happens when I try to call PersistenceBrokerFactory.defaultPersistenceBroker() with PB or db.open("OJB", Database.OPEN_READ_WRITE) with ODMG). Regards, Fiona Caused by: org.apache.ojb.broker.metadata.MetadataException: Class org.apache.ojb.tutorial1.Product could not be found in the classpath. This could cause unexpected behaviour of OJB, please remove or comment out this class descriptor in the repository.xml file. at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(RepositoryXmlHandler.java:206) at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source) at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.ojb.broker.metadata.RepositoryPersistor.readMetadataFromXML(RepositoryPersistor.java:309) at org.apache.ojb.broker.metadata.RepositoryPersistor.buildRepository(RepositoryPersistor.java:264) at org.apache.ojb.broker.metadata.RepositoryPersistor.readDescriptorRepository(RepositoryPersistor.java:176) at org.apache.ojb.broker.metadata.MetadataManager.init(MetadataManager.java:148) ... 8 more Caused by: java.lang.ClassNotFoundException: org.apache.ojb.tutorial1.Product at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at org.apache.ojb.broker.util.ClassHelper.getClass(ClassHelper.java:30) at org.apache.ojb.broker.util.ClassHelper.getClass(ClassHelper.java:98) at org.apache.ojb.broker.metadata.RepositoryXmlHandler.startElement(RepositoryXmlHandler.java:199) ... 21 more -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [JDO] Problem with byte-code enhancement
Ok, I continue to search any solutions. Which tool you use to enhance byte-code ? (other that JDORI). I have a case of update that running good with 1..n relation. But I didn't look further these tests. Thanks, Alexandre Nicolas Arni-Bloch wrote: I try your class and it work for me. Just to now. Be careful if you want to use the OJB plugging for JDORI because it doesn't work very well (or I don't now how to use it). The 1..n and n..m relation have problem with the persistence by reachability. When you get object with a query, reachable objects are load in Transient state (I think) so when you make the commit JDO make a insert in place of a update. Here the class (the contentType field those not exit so I change the code) public final class CFile { private long id; // primary-key, autoincrement private String fileName; private String contentFile; protected CFile() { } protected CFile(final String fileName, final String contentType, final InputStream fileStream) { } public long getId() { return id; } public String getFileName() { return fileName; } public InputStream getContentFile() { return (InputStream) new ByteArrayInputStream(contentFile.getBytes()); } } And the CFile.jdo http://java.sun.com/dtd/jdo_1_0.dtd";> I make : java com.sun.jdori.enhancer.Main test/jdo/model/CFile.class test/jdo/model/CFile.jdo Le 26 avr. 04, à 12:33, Alexandre BOISSEAU a écrit : Hi Nicolas, I use the enhancer provided by jdori (com.sun.jdori.enhancer) and db-ojb-1.0.rc6. I don't know, because I have a similar class without problem during enhancement and running. Here my class file : public final class CFile { private long id; // primary-key, autoincrement private String fileName; private String contentFile; protected CFile() { } protected CFile(final String fileName, final String contentType, final InputStream fileStream) { this(); try { contentFile = IOUtils.toString(fileStream); } catch (IOException ex) { ex.printStackTrace(); } this.fileName = fileName; this.contentType = contentType; } public long getId() { return id; } protected String getContentType() { return contentType; } public String getFileName() { return fileName; } public InputStream getContentFile() { return (InputStream) new ByteArrayInputStream(contentFile.getBytes()); } public String toString() { return "File : id=" + id + " ; fileName=" + fileName + " ; contentType=" + contentType; } } Nicolas Arni-Bloch wrote: Hi Alexandre, could you send the java class ? wish version of the jdo enhancer do you use ? Le 26 avr. 04, à 09:00, Alexandre BOISSEAU a écrit : Hi, I have a class file with an 'long id' autoincrementally. During byte-code enhancement, I get the following error : [java] Error while enhancing: JDO ENHANCER: At least one error occurred while enhancing input class for Transparent Persistence; detailed message(s): nested exception: com.sun.jdori.model.ModelFatalException: ReflectionJavaField.ensureInitializedField: cannot find reflection field instance for field id. [java] com.sun.jdori.enhancer.EnhancerUserException: JDO ENHANCER: At least one error occurred while enhancing input class for Transparent Persistence; detailed message(s): nested exception: com.sun.jdori.model.ModelFatalException: ReflectionJavaField.ensureInitializedField: cannot find reflection field instance for field id. [java] at com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile(Unknown Source) [java] at com.sun.jdori.enhancer.Main.enhanceClassFile(Unknown Source) [java] at com.sun.jdori.enhancer.Main.enhanceInputFiles(Unknown Source) [java] at com.sun.jdori.enhancer.Main.process(Unknown Source) [java] at com.sun.jdori.enhancer.Main.main(Unknown Source) Contents of XML Metadate file : ... Please help me ? And if you need other details ... Regards, Alexandre. -- Alexandre BOISSEAU University of Rennes1 - France - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nicolas Arni-Bloch Groupe MATIS, Centre Universitaire d'Informatique 24 rue General-Dufour CH-1204 Genève eMail : [EMAIL PROTECTED] phone : +41 22 379 76 80 fax : +41 22 379 77 80 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional command
Re: [JDO] Problem with byte-code enhancement
Hi Nicolas, I use the enhancer provided by jdori (com.sun.jdori.enhancer) and db-ojb-1.0.rc6. I don't know, because I have a similar class without problem during enhancement and running. Here my class file : public final class CFile { private long id; // primary-key, autoincrement private String fileName; private String contentFile; protected CFile() { } protected CFile(final String fileName, final String contentType, final InputStream fileStream) { this(); try { contentFile = IOUtils.toString(fileStream); } catch (IOException ex) { ex.printStackTrace(); } this.fileName = fileName; this.contentType = contentType; } public long getId() { return id; } protected String getContentType() { return contentType; } public String getFileName() { return fileName; } public InputStream getContentFile() { return (InputStream) new ByteArrayInputStream(contentFile.getBytes()); } public String toString() { return "File : id=" + id + " ; fileName=" + fileName + " ; contentType=" + contentType; } } Nicolas Arni-Bloch wrote: Hi Alexandre, could you send the java class ? wish version of the jdo enhancer do you use ? Le 26 avr. 04, à 09:00, Alexandre BOISSEAU a écrit : Hi, I have a class file with an 'long id' autoincrementally. During byte-code enhancement, I get the following error : [java] Error while enhancing: JDO ENHANCER: At least one error occurred while enhancing input class for Transparent Persistence; detailed message(s): nested exception: com.sun.jdori.model.ModelFatalException: ReflectionJavaField.ensureInitializedField: cannot find reflection field instance for field id. [java] com.sun.jdori.enhancer.EnhancerUserException: JDO ENHANCER: At least one error occurred while enhancing input class for Transparent Persistence; detailed message(s): nested exception: com.sun.jdori.model.ModelFatalException: ReflectionJavaField.ensureInitializedField: cannot find reflection field instance for field id. [java] at com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile(Unknown Source) [java] at com.sun.jdori.enhancer.Main.enhanceClassFile(Unknown Source) [java] at com.sun.jdori.enhancer.Main.enhanceInputFiles(Unknown Source) [java] at com.sun.jdori.enhancer.Main.process(Unknown Source) [java] at com.sun.jdori.enhancer.Main.main(Unknown Source) Contents of XML Metadate file : ... Please help me ? And if you need other details ... Regards, Alexandre. -- Alexandre BOISSEAU University of Rennes1 - France - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Nicolas Arni-Bloch Groupe MATIS, Centre Universitaire d'Informatique 24 rue General-Dufour CH-1204 Genève eMail : [EMAIL PROTECTED] phone : +41 22 379 76 80 fax : +41 22 379 77 80 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Alexandre BOISSEAU Université de Rennes1 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[JDO] Problem with byte-code enhancement
Hi, I have a class file with an 'long id' autoincrementally. During byte-code enhancement, I get the following error : [java] Error while enhancing: JDO ENHANCER: At least one error occurred while enhancing input class for Transparent Persistence; detailed message(s): nested exception: com.sun.jdori.model.ModelFatalException: ReflectionJavaField.ensureInitializedField: cannot find reflection field instance for field id. [java] com.sun.jdori.enhancer.EnhancerUserException: JDO ENHANCER: At least one error occurred while enhancing input class for Transparent Persistence; detailed message(s): nested exception: com.sun.jdori.model.ModelFatalException: ReflectionJavaField.ensureInitializedField: cannot find reflection field instance for field id. [java] at com.sun.jdori.enhancer.filter.Enhancer.enhanceClassFile(Unknown Source) [java] at com.sun.jdori.enhancer.Main.enhanceClassFile(Unknown Source) [java] at com.sun.jdori.enhancer.Main.enhanceInputFiles(Unknown Source) [java] at com.sun.jdori.enhancer.Main.process(Unknown Source) [java] at com.sun.jdori.enhancer.Main.main(Unknown Source) Contents of XML Metadate file : ... Please help me ? And if you need other details ... Regards, Alexandre. -- Alexandre BOISSEAU University of Rennes1 - France - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]