Hi Marc,

I executed the following code in a test case using the mm MySQL drivers 
and it worked, single quotes/funny characters and all. Can I recommend 
you try the mm drivers and see if the problem goes away? I could not get 
Resin's drivers to work. My configs are below.

Cheers,

Patrick

public void setUp()
            throws PersistenceException {
        ORProgram or = new ORProgram();
        // Open transaction in order to perform JDO operations
        _db = _category.getDatabase( verbose );
       
        _db.begin();
       
       or.setName("te's''s/;s;s8;d;(784327~dlfd'st");
       or.setDescription("asdf'lldfdfl'");
       or.setAmortizeLifetime(5);
       or.setTerm(1);
       or.setRateType(1);
       or.setLoanType(1);
       or.setAuditUserId(1);
       or.setAuditVersionNo(1);
       or.setAuditCreateDate(new java.util.Date());
        or.setAuditModDate(new java.util.Date());
        _db.create(or);
       
       
        _db.commit();
       
    }


Here is the mm config I used.

<database name="mysql" engine="mysql" >
    <driver url="jdbc:mysql://10.1.8.238/test"
            class-name="org.gjt.mm.mysql.Driver">
         <param name="user" value="test" />
         <param name="password" value="t3st" />
    </driver>
  <mapping href="mapping.xml" />
</database>

Sadly, I cannot get the Caucho driver to work with my set-up, I get an 
error when I try this config

<database name="mysql" engine="mysql" >
    <driver url="jdbc:mysql-caucho://10.1.8.238/test"
            class-name="com.caucho.jdbc.mysql.Driver">
         <param name="user" value="test" />
         <param name="password" value="t3st" />
    </driver>
  <mapping href="mapping.xml" />
</database>

the error I get when using the Caucho driver is this. Maybe it's 
obvious, but given that it all works fine with the mm driver I am 
reluctant to fiddle with this anymore ;-)

java.lang.NoClassDefFoundError: com/caucho/vfs/LogStream
        at com.caucho.jdbc.mysql.Driver.<clinit>(Driver.java:61)
        at java.lang.Class.forName0(Native Method)




Marc Dugger wrote:

>>Attached is the stacktrace, DDL, and updated mapping.xml--the
>>ORPersistable class that ORProgram was extending does not exist anymore.
>>
>> <<stacktrace.txt>>  <<program.sql>>  <<ORProgram.java>> 
>>Thanks a ton for your assistance on this!
>>
>>-md
>>
>>
>>-----Original Message-----
>>From: Patrick van Kann [mailto:[EMAIL PROTECTED]]
>>Sent: Monday, July 15, 2002 11:45 AM
>>To: [EMAIL PROTECTED]
>>Subject: More info
>>
>>
>>Hi Marc,
>>
>>I've gone off-list to reduce traffic. Could you send me the .java for 
>>your persistent class and a MySQL dump of your db structure? I will try 
>>and replicate the problem my end. Everything looks fine to me but I 
>>always find the easiest way is just to build a test case and have a 
>>fiddle around.
>>
>>Cheers,
>>
>>Patrick
>>
>>------------------------------------------------------------------------
>>
>>Buildfile: build.xml
>>
>>prepare:
>>
>>clean:
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/EntityRelationNotFoundException.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/DBException.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/DeleteException.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/EntityNotFoundException.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/CreateException.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/NoSuchBeanException.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/RecordCountExceededException.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/exception/UpdateException.class
>>   [delete] Deleting directory 
>/home/marc/ratenet/classes/com/ratenet/common/exception
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/common/ConfigManager.class
>>   [delete] Deleting directory /home/marc/ratenet/classes/com/ratenet/common
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/program/ProgramManager.class
>>   [delete] Deleting /home/marc/ratenet/classes/com/ratenet/program/Program.class
>>   [delete] Deleting /home/marc/ratenet/classes/com/ratenet/program/ProgramImpl.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/program/ProgramManagerTest$DummyProgram.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/program/ProgramManagerTest$1.class
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/program/ProgramManagerTest.class
>>   [delete] Deleting directory /home/marc/ratenet/classes/com/ratenet/program
>>   [delete] Deleting /home/marc/ratenet/classes/com/ratenet/or/ORProgram.class
>>   [delete] Deleting /home/marc/ratenet/classes/com/ratenet/or/ORManager.class
>>   [delete] Deleting directory /home/marc/ratenet/classes/com/ratenet/or
>>   [delete] Deleting 
>/home/marc/ratenet/classes/com/ratenet/util/ResourceResolver.class
>>   [delete] Deleting /home/marc/ratenet/classes/com/ratenet/util/Log4jProxy.class
>>   [delete] Deleting directory /home/marc/ratenet/classes/com/ratenet/util
>>   [delete] Deleting /home/marc/ratenet/classes/com/ratenet/RatenetTestSuite.class
>>   [delete] Deleting directory /home/marc/ratenet/classes/com/ratenet
>>   [delete] Deleting directory /home/marc/ratenet/classes/com
>>   [delete] Deleting 
>/home/marc/ratenet/classes/java/com/soco/www/LifecycleListener.class
>>   [delete] Deleting directory /home/marc/ratenet/classes/java/com/soco/www
>>   [delete] Deleting directory /home/marc/ratenet/classes/java/com/soco
>>   [delete] Deleting directory /home/marc/ratenet/classes/java/com
>>   [delete] Deleting directory /home/marc/ratenet/classes/java
>>   [delete] Deleting /home/marc/ratenet/classes/log4j.properties
>>   [delete] Deleting /home/marc/ratenet/classes/database.xml
>>   [delete] Deleting /home/marc/ratenet/classes/ratenet.properties
>>   [delete] Deleting /home/marc/ratenet/classes/mapping.xml
>>   [delete] Deleting /home/marc/ratenet/classes/classmap.properties
>>   [delete] Deleting directory /home/marc/ratenet/classes
>>
>>compile-beans:
>>     [echo] /home/marc/ratenet/resource/beans.xsd
>>     [java] -- Suppressing non fatal warnings.
>>     [java] -- Disabling generation of Class descriptors
>>     [java] -- Disabling generation of Marshalling framework methods (marshall, 
>unmarshall, validate).
>>
>>compile-java:
>>    [mkdir] Created dir: /home/marc/ratenet/classes
>>    [javac] Compiling 19 source files to /home/marc/ratenet/classes
>>
>>compile-resources:
>>     [copy] Copying 5 files to /home/marc/ratenet/classes
>>
>>compile:
>>
>>test:
>>     [echo] ** See build/tests/ for test output logs **
>>    [junit] Running com.ratenet.RatenetTestSuite
>>    [junit] 2002-07-15 12:48:01,136 [main] DEBUG util - attempting to load resource 
>for database.xml
>>    [junit] 2002-07-15 12:48:01,182 [main] DEBUG util - loaded database.xml from 
>thread's classloader
>>    [junit] 2002-07-15 12:48:01,184 [main] DEBUG util - attempting to load resource 
>for mapping.xml
>>    [junit] 2002-07-15 12:48:01,189 [main] DEBUG util - loaded mapping.xml from 
>thread's classloader
>>    [junit] 2002-07-15 12:48:12,046 [main] DEBUG util - attempting to load resource 
>for ratenet.properties
>>    [junit] 2002-07-15 12:48:12,054 [main] DEBUG util - loaded ratenet.properties 
>from thread's classloader
>>    [junit] 2002-07-15 12:48:12,516 [main] DEBUG util - attempting to load resource 
>for classmap.properties
>>    [junit] 2002-07-15 12:48:12,524 [main] DEBUG util - loaded classmap.properties 
>from thread's classloader
>>    [junit] 2002-07-15 12:48:12,574 [main] DEBUG or - Found mapped class for 
>com.ratenet.or.ORProgram: com.ratenet.program.ProgramImpl
>>    [junit] java.io.FileNotFoundException: 
>/home/marc/ratenet/config/security.properties (No such file or directory)
>>    [junit]   at java.io.FileInputStream.open(Native Method)
>>    [junit]   at java.io.FileInputStream.<init>(FileInputStream.java:59)
>>    [junit]   at java.io.FileInputStream.<init>(FileInputStream.java:90)
>>    [junit]   at 
>com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
>>    [junit]   at com.sun.enterprise.iiop.POAEJBORB.<clinit>(POAEJBORB.java:78)
>>    [junit]   at java.lang.Class.forName0(Native Method)
>>    [junit]   at java.lang.Class.forName(Class.java:190)
>>    [junit]   at org.omg.CORBA.ORB.create_impl(ORB.java:279)
>>    [junit]   at org.omg.CORBA.ORB.init(ORB.java:323)
>>    [junit]   at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:138)
>>    [junit]   at com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
>>    [junit]   at 
>com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitContextFactory.java:31)
>>    [junit]   at java.lang.Class.newInstance0(Native Method)
>>    [junit]   at java.lang.Class.newInstance(Class.java:232)
>>    [junit]   at 
>javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:647)
>>    [junit]   at 
>javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
>>    [junit]   at javax.naming.InitialContext.init(InitialContext.java:217)
>>    [junit]   at javax.naming.InitialContext.<init>(InitialContext.java:173)
>>    [junit]   at org.exolab.castor.jdo.JDO.getDatabase(Unknown Source)
>>    [junit]   at com.ratenet.or.ORManager.save(ORManager.java:88)
>>    [junit]   at 
>com.ratenet.program.ProgramManager.createProgram(ProgramManager.java:23)
>>    [junit]   at 
>com.ratenet.program.ProgramManagerTest.testCreateProgram(ProgramManagerTest.java:21)
>>    [junit]   at java.lang.reflect.Method.invoke(Native Method)
>>    [junit]   at junit.framework.TestCase.runTest(TestCase.java:166)
>>    [junit]   at junit.framework.TestCase.runBare(TestCase.java:140)
>>    [junit]   at junit.framework.TestResult$1.protect(TestResult.java:106)
>>    [junit]   at junit.framework.TestResult.runProtected(TestResult.java:124)
>>    [junit]   at junit.framework.TestResult.run(TestResult.java:109)
>>    [junit]   at junit.framework.TestCase.run(TestCase.java:131)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:231)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:409)
>>    [junit] java.io.FileNotFoundException: /home/marc/ratenet/config/ejb.properties 
>(No such file or directory)
>>    [junit]   at java.io.FileInputStream.open(Native Method)
>>    [junit]   at java.io.FileInputStream.<init>(FileInputStream.java:59)
>>    [junit]   at java.io.FileInputStream.<init>(FileInputStream.java:90)
>>    [junit]   at 
>com.sun.enterprise.util.Utility.getPropertiesFromFile(Utility.java:42)
>>    [junit]   at 
>com.sun.enterprise.iiop.J2EEInitializer.<init>(J2EEInitializer.java:54)
>>    [junit]   at java.lang.Class.newInstance0(Native Method)
>>    [junit]   at java.lang.Class.newInstance(Class.java:232)
>>    [junit]   at 
>com.sun.corba.ee.internal.Interceptors.PIORB.registerORBInitializers(PIORB.java:377)
>>    [junit]   at 
>com.sun.corba.ee.internal.Interceptors.PIORB.parseProperties(PIORB.java:347)
>>    [junit]   at 
>com.sun.corba.ee.internal.TxPOA.TxPIORB.parseProperties(TxPIORB.java:116)
>>    [junit]   at com.sun.corba.ee.internal.corba.ORB.set_parameters(ORB.java:461)
>>    [junit]   at com.sun.corba.ee.internal.POA.POAORB.set_parameters(POAORB.java:156)
>>    [junit]   at 
>com.sun.corba.ee.internal.Interceptors.PIORB.set_parameters(PIORB.java:336)
>>    [junit]   at org.omg.CORBA.ORB.init(ORB.java:324)
>>    [junit]   at com.sun.enterprise.util.ORBManager.createORB(ORBManager.java:138)
>>    [junit]   at com.sun.enterprise.util.ORBManager.init(ORBManager.java:65)
>>    [junit]   at 
>com.sun.enterprise.naming.SerialInitContextFactory.<init>(SerialInitContextFactory.java:31)
>>    [junit]   at java.lang.Class.newInstance0(Native Method)
>>    [junit]   at java.lang.Class.newInstance(Class.java:232)
>>    [junit]   at 
>javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:647)
>>    [junit]   at 
>javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
>>    [junit]   at javax.naming.InitialContext.init(InitialContext.java:217)
>>    [junit]   at javax.naming.InitialContext.<init>(InitialContext.java:173)
>>    [junit]   at org.exolab.castor.jdo.JDO.getDatabase(Unknown Source)
>>    [junit]   at com.ratenet.or.ORManager.save(ORManager.java:88)
>>    [junit]   at 
>com.ratenet.program.ProgramManager.createProgram(ProgramManager.java:23)
>>    [junit]   at 
>com.ratenet.program.ProgramManagerTest.testCreateProgram(ProgramManagerTest.java:21)
>>    [junit]   at java.lang.reflect.Method.invoke(Native Method)
>>    [junit]   at junit.framework.TestCase.runTest(TestCase.java:166)
>>    [junit]   at junit.framework.TestCase.runBare(TestCase.java:140)
>>    [junit]   at junit.framework.TestResult$1.protect(TestResult.java:106)
>>    [junit]   at junit.framework.TestResult.runProtected(TestResult.java:124)
>>    [junit]   at junit.framework.TestResult.run(TestResult.java:109)
>>    [junit]   at junit.framework.TestCase.run(TestCase.java:131)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:231)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:409)
>>    [junit] 
>>    [junit] Warning: unable to read transaction.interoperability config property
>>    [junit] 2002-07-15 12:48:19,085 [main] DEBUG or - Setting name with value 
>30-year/fixed/conv.
>>    [junit] 2002-07-15 12:48:19,091 [main] DEBUG or - Setting description with value 
>30-year fixed rate conventional loan
>>    [junit] 2002-07-15 12:48:19,094 [main] DEBUG or - Setting amortizeLifetime with 
>value 30
>>    [junit] 2002-07-15 12:48:19,096 [main] DEBUG or - Setting term with value 30
>>    [junit] 2002-07-15 12:48:19,098 [main] DEBUG or - Setting rateType with value 1
>>    [junit] 2002-07-15 12:48:19,103 [main] DEBUG or - Setting loanType with value 1
>>    [junit] 2002-07-15 12:48:19,105 [main] DEBUG or - Setting auditCreateDate with 
>value null
>>    [junit] 2002-07-15 12:48:19,107 [main] DEBUG or - Setting auditModDate with 
>value null
>>    [junit] 2002-07-15 12:48:19,109 [main] DEBUG or - Setting auditUserId with value >0
>>    [junit] 2002-07-15 12:48:19,112 [main] DEBUG or - Setting auditVersionNo with 
>value 0
>>    [junit] 2002-07-15 12:48:20,229 [main] DEBUG or - Persistence failed: Nested 
>error: java.sql.SQLException: You have an error in your SQL syntax near '30-year 
>fixed rate conventional loan,30,30,1,1,null,null,0,0)' at line 1
>>    [junit] com.ratenet.common.exception.DBException: Nested error: 
>java.sql.SQLException: You have an error in your SQL syntax near '30-year fixed rate 
>conventional loan,30,30,1,1,null,null,0,0)' at line 1
>>    [junit]   at com.ratenet.or.ORManager.save(ORManager.java:102)
>>    [junit]   at 
>com.ratenet.program.ProgramManager.createProgram(ProgramManager.java:23)
>>    [junit]   at 
>com.ratenet.program.ProgramManagerTest.testCreateProgram(ProgramManagerTest.java:21)
>>    [junit]   at java.lang.reflect.Method.invoke(Native Method)
>>    [junit]   at junit.framework.TestCase.runTest(TestCase.java:166)
>>    [junit]   at junit.framework.TestCase.runBare(TestCase.java:140)
>>    [junit]   at junit.framework.TestResult$1.protect(TestResult.java:106)
>>    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 21.608 sec
>>    [junit]   at junit.framework.TestResult.runProtected(TestResult.java:124)
>>    [junit]   at junit.framework.TestResult.run(TestResult.java:109)
>>    [junit] Testsuite: com.ratenet.RatenetTestSuite
>>    [junit] Tests run: 1, Failures: 1, Errors: 0, Time elapsed: 21.608 sec
>>    [junit] 
>>    [junit]   at junit.framework.TestCase.run(TestCase.java:131)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit] Testcase: testCreateProgram took 21.571 sec
>>    [junit]   FAILED
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit] Program creation failed: Nested error: java.sql.SQLException: You have 
>an error in your SQL syntax near '30-year fixed rate conventional 
>loan,30,30,1,1,null,null,0,0)' at line 1
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:231)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:409)
>>    [junit] junit.framework.AssertionFailedError: Program creation failed: Nested 
>error: java.sql.SQLException: You have an error in your SQL syntax near '30-year 
>fixed rate conventional loan,30,30,1,1,null,null,0,0)' at line 1
>>    [junit]   at junit.framework.Assert.fail(Assert.java:51)
>>    [junit]   at 
>com.ratenet.program.ProgramManagerTest.testCreateProgram(ProgramManagerTest.java:25)
>>    [junit]   at java.lang.reflect.Method.invoke(Native Method)
>>    [junit]   at junit.framework.TestCase.runTest(TestCase.java:166)
>>    [junit]   at junit.framework.TestCase.runBare(TestCase.java:140)
>>    [junit]   at junit.framework.TestResult$1.protect(TestResult.java:106)
>>    [junit]   at junit.framework.TestResult.runProtected(TestResult.java:124)
>>    [junit]   at junit.framework.TestResult.run(TestResult.java:109)
>>    [junit]   at junit.framework.TestCase.run(TestCase.java:131)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at junit.framework.TestSuite.runTest(TestSuite.java:173)
>>    [junit]   at junit.framework.TestSuite.run(TestSuite.java:168)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:231)
>>    [junit]   at 
>org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:409)
>>    [junit] 
>>
>>BUILD SUCCESSFUL
>>
>>Total time: 58 seconds
>>    
>>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to