You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Fay Wang (JIRA)" <ji...@apache.org> on 2010/02/16 19:25:28 UTC

[jira] Commented: (OPENJPA-428) Bad error message regarding "openjpa.Id"

    [ https://issues.apache.org/jira/browse/OPENJPA-428?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12834361#action_12834361 ] 

Fay Wang commented on OPENJPA-428:
----------------------------------

There is another scenario to get the message of 'The property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id". ':

C:\was70\bin>set classpath=D:\db2jcc.jar;D:\db2jcc_license_cu.jar;D:\pdq.jar;D:\pdqmgmt.jar;D:\META-INF

C:\was70\bin>wsdb2gen -pu CustomerEJB3 -url jdbc:db2://localhost:50000/DEMODB -user user1 -pw password1
Start WsJpaDB2Gen for CustomerEJB3...
94  WARN   [main] openjpa.Runtime - The configuration property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id".
url from user is jdbc:db2://localhost:50000/DEMODB
URL from user is jdbc:db2://localhost:50000/DEMODB
ConnectionProperties: DriverType=4, DatabaseName=DEMODB, PortNumber=50000, ServerName=localhost
1203  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "com.ibm.ws.persistence.jdbc.sql.DB2Dictionary".
1719  INFO   [main] openjpa.Runtime - Starting OpenJPA 2.0.0-M3
2047  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class "com.ibm.ws.persistence.pdqstatic.jdbc.sql.StaticDB2Dictionary".
Done!

Note that the persistence.xml is in D:\META-INF. However, the classpath is set to D:\META-INF. If the classpath is changed to D:\ , the project works fine. No more the message about openjpa.Id. 




> Bad error message regarding "openjpa.Id"
> ----------------------------------------
>
>                 Key: OPENJPA-428
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-428
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.0.0
>            Reporter: Vitor Rodrigues
>            Priority: Minor
>         Attachments: OPENJPA-428-test.jar
>
>
> Hi all, this bug is to report a confusing and misplaced error message. Problem is described below. Feel free to request more info from me.
> When running my project with OpenJPA, I get the following error message:
> 140  INFO   [http-0.0.0.0-8080-Processor23] openjpa.Runtime - Starting OpenJPA 1.0.0
> 380  INFO   [http-0.0.0.0-8080-Processor23] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary".
> 20  WARN   [http-0.0.0.0-8080-Processor25] openjpa.Runtime - The property named "openjpa.Id" was not recognized and will be ignored, although the name closely matches a valid property called "openjpa.Id".
> 100  INFO   [http-0.0.0.0-8080-Processor25] openjpa.Runtime - Starting OpenJPA 1.0.0
> 300  INFO   [http-0.0.0.0-8080-Processor25] openjpa.jdbc.JDBC - Using dictionary class "org.apache.openjpa.jdbc.sql.DB2Dictionary".
> As you can see, the two property names printed are the same, not different or similar. I retyped all my @Id annotations to make sure there was no special character in one of them coming from copy&paste.
> Furthermore, I was able to identify that the error message was being printed only when I removed the @Id annotation from one of my classes (all the other classes still have @Id).
> Here is a sample of my class without @Id annotation:
> @Entity
> @Table(name="TAX", schema="JPA_SC")
> public class Tax  {
> 	
> 	// Class variables  
> 	protected double taxamount;
>  
> 	public Tax(){
> 		
> 	}
> 	
> 	public Tax(double taxamount){
> 		this.taxamount = taxamount;
> 	}
> //plus getter and setter for taxamount
> }
> Regards,
> Vitor Rodrigues

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.