openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Web developer <webautomat...@gmail.com>
Subject Re: [OFF-LINE] Re: Test run
Date Sun, 06 Jun 2010 18:44:00 GMT
What else you need from me to explain? No mappings and sequence table
generated for ANY database. It looks like runtime tools might work. But
currently I am interested in external mapping configuration file for forced
processing via mapping tool rather *.java or *.bin file processing. In any
case I should care now only about manual mapping(no runtime). It just gives
me more guarantee against runtime features. John

P.S. Yes, I am still running samples. That's because batch tools in OpenJPA
still do not work. Otherwise I would already move to Salient.

2010/5/27 Rick Curtis <curtisr7@gmail.com>

> Please describe what you are trying to do?
>
> 2010/5/27 Web developer <webautomator2@gmail.com>
>
>> Here is how I changed the runner configuration:
>>
>> -Dopenjpa.jdbc.SynchronizeMappings=buildSchema
>> -Dopenjpa.ConnectionDriverName=org.h2.Driver
>>
>> -Dopenjpa.ConnectionURL=jdbc:h2:/tmp/persist_backend
>> -Dopenjpa.DynamicEnhancementAgent=false
>> -Dopenjpa.RuntimeUnenhancedClasses=unsupported
>>
>> And here is the output:
>>
>> 212  embeddables  INFO   [main] openjpa.Runtime - Starting OpenJPA
>> 2.0.0-beta3
>> 483  embeddables  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
>> "org.apache.openjpa.jdbc.sql.H2Dictionary".
>> Exception in thread "main" <openjpa-2.0.0-beta3-r422266:926797 nonfatal
>> user error> org.apache.openjpa.persistence.ArgumentException: An error
>> occurred while parsing the query filter "SELECT u FROM User u , in
>> (u.addresses) a WHERE a.coordinates.longitude='38'". Error message: No field
>> named "coordinates" in "Address". Did you mean "city"? Expected one of the
>> available field names in "Address": "[city, state, street, zip]".
>>     at
>> org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.parseException(AbstractExpressionBuilder.java:119)
>>     at
>> org.apache.openjpa.kernel.exps.AbstractExpressionBuilder.traversePath(AbstractExpressionBuilder.java:296)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPath(JPQLExpressionBuilder.java:1941)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getPathOrConstant(JPQLExpressionBuilder.java:1861)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLExpressionBuilder.java:1169)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue(JPQLExpressionBuilder.java:2054)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getValue(JPQLExpressionBuilder.java:2040)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLExpressionBuilder.java:1055)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getExpression(JPQLExpressionBuilder.java:1970)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.eval(JPQLExpressionBuilder.java:997)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.evalWhereClause(JPQLExpressionBuilder.java:668)
>>     at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getQueryExpressions(JPQLExpressionBuilder.java:297)
>>     at org.apache.openjpa.kernel.jpql.JPQLParser.eval(JPQLParser.java:67)
>>     at
>> org.apache.openjpa.kernel.ExpressionStoreQuery$DataStoreExecutor.<init>(ExpressionStoreQuery.java:733)
>>     at
>> org.apache.openjpa.kernel.ExpressionStoreQuery.newDataStoreExecutor(ExpressionStoreQuery.java:171)
>>     at
>> org.apache.openjpa.kernel.QueryImpl.createExecutor(QueryImpl.java:747)
>>     at
>> org.apache.openjpa.kernel.QueryImpl.compileForDataStore(QueryImpl.java:705)
>>     at
>> org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:687)
>>     at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:587)
>>     at
>> org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:976)
>>     at
>> org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:962)
>>     at
>> org.apache.openjpa.persistence.EntityManagerImpl.createQuery(EntityManagerImpl.java:98)
>>     at Main.runQueries(Main.java:21)
>>     at Main.main(Main.java:11)
>>
>> After removing earlier mentioned option previous exception about
>> non-existing tables is gone. It looks like it really create something in
>> database. I will check later what is in H2 database. John
>>
>> 2010/5/27 Rick Curtis <curtisr7@gmail.com>
>>
>> Did you read my previous reply? In your previous emails you had two
>>> problems. The first problem[1] was because you were running TableJDBCSeq
>>> manually and there were multiple persistence units defined in your
>>> persistence.xml file. When you removed the other persistence units from that
>>> file, this problem went away. Correct?
>>>
>>> > Do you have the property -Dopenjpa.jdbc.SynchronizeMappings=buildSchema
>>> specified anywhere? That property will automatically create the necessary
>>> tables at runtime.
>>> Did you try this?
>>>
>>> >If you're still having problems, I'd suggest putting together a coherent
>>> question and posting it back to the users mailing list.
>>> Forwarding this string of emails onto the dev mailing list doesn't
>>> constitute a coherent question. You will receive a much better response with
>>> a well thought-out question.
>>>
>>> Thanks,
>>> Rick
>>>
>>> [1] CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL,
>>> SEQUENCE_VALUE BIGINT, PRIMARY KEY (ID)) [42101-132] {stmnt 1301078346
>>> CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE
>>> BIGINT, PRIMARY KEY (ID))} [code=42101, state=42S01]
>>> org.apache.openjpa.lib.jdbc.ReportingSQLException: Таблица
>>> "OPENJPA_SEQUENCE_TABLE" уже существует
>>> Table "OPENJPA_SEQUENCE_TABLE" already exists; SQL statement:
>>> CREATE TABLE OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE
>>> BIGINT, PRIMARY KEY (ID)) [42101-132] {stmnt 1301078346 CREATE TABLE
>>> OPENJPA_SEQUENCE_TABLE (ID TINYINT NOT NULL, SEQUENCE_VALUE BIGINT, PRIMARY
>>> KEY (ID))} [code=42101, state=42S01]
>>>  at
>>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:257)
>>> at
>>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:241)
>>>  at
>>> org.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:70)
>>> ......
>>>
>>> 2010/5/27 Web developer <webautomator2@gmail.com>
>>>
>>>
>>>> >The main method that you are calling isn't a main line path that most
>>>> (if >any) people go down.
>>>> >
>>>> > Do you have the property
>>>> -Dopenjpa.jdbc.SynchronizeMappings=buildSchema [2] specified anywhere? That
>>>> property will automatically create the necessary tables at runtime.
>>>> >
>>>> > If you're still having problems, I'd suggest putting together a
>>>> coherent question and posting it back to the users mailing list.
>>>> >
>>>> > Thanks,
>>>> > Rick
>>>> >
>>>> > [1] http://openjpa.apache.org/samples.html
>>>> > [2]
>>>> http://openjpa.apache.org/builds/2.0.0/apache-openjpa-2.0.0/docs/manual/manual.html#ref_guide_mapping_synch
>>>> >
>>>> >
>>>>
>>>>
>>>
>>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message