You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Dale Lane (JIRA)" <ji...@apache.org> on 2011/08/25 13:31:29 UTC
[jira] [Created] (OPENJPA-2044) Invalid header in MetaModel classes
generated by AnnotationProcessor
Invalid header in MetaModel classes generated by AnnotationProcessor
--------------------------------------------------------------------
Key: OPENJPA-2044
URL: https://issues.apache.org/jira/browse/OPENJPA-2044
Project: OpenJPA
Issue Type: Bug
Components: Enhance
Affects Versions: 2.1.1, 2.0.1
Environment: Any
Reporter: Dale Lane
Priority: Trivial
The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
-Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
This option does not work.
If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
sun.net.www.content.text.PlainTextInputStream@9ea09ea
in the header instead.
I suspect that the AnnotationProcessor is essentially doing:
URL headerurl = new URL(<openjpa.header value>);
String newHeaderComment = headerurl.getContent().toString();
The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
Then the toString() call just returns the string representation of the instance of the InputStream object.
I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Work started] (OPENJPA-2044) Invalid header in MetaModel
classes generated by AnnotationProcessor
Posted by "Kevin Sutter (Work started) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Work on OPENJPA-2044 started by Kevin Sutter.
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.0.1, 2.1.1, 2.2.0
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Fix For: 2.2.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Closed] (OPENJPA-2044) Invalid header in MetaModel classes
generated by AnnotationProcessor
Posted by "Albert Lee (Closed) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Albert Lee closed OPENJPA-2044.
-------------------------------
Close issue in-preparation for 2.2.0 release.
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.0.1, 2.1.1, 2.2.0
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Fix For: 2.2.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (OPENJPA-2044) Invalid header in MetaModel
classes generated by AnnotationProcessor
Posted by "Kevin Sutter (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Sutter reassigned OPENJPA-2044:
-------------------------------------
Assignee: Kevin Sutter
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance
> Affects Versions: 2.0.1, 2.1.1
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENJPA-2044) Invalid header in MetaModel
classes generated by AnnotationProcessor
Posted by "Kevin Sutter (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126581#comment-13126581 ]
Kevin Sutter commented on OPENJPA-2044:
---------------------------------------
I already committed the changes to trunk. Since the original URL processing code was localized to AnnotationProcessor6, I followed the same pattern. Moving this type of simple change to Files seemed like overkill. And, since the actual processing of the stream into Comment format is pretty unique to the SourceCode file, I really didn't see a need to generalize it for Files.
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.0.1, 2.1.1, 2.2.0
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Fix For: 2.2.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENJPA-2044) Invalid header in MetaModel
classes generated by AnnotationProcessor
Posted by "Dale Lane (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13128882#comment-13128882 ]
Dale Lane commented on OPENJPA-2044:
------------------------------------
Tried the fix from a nightly snapshot - it fixed the problem for us. The MetaModel classes are now being generated correctly. Many thanks.
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.0.1, 2.1.1, 2.2.0
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Fix For: 2.2.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENJPA-2044) Invalid header in MetaModel classes
generated by AnnotationProcessor
Posted by "Dale Lane (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dale Lane updated OPENJPA-2044:
-------------------------------
Description:
The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
-Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
This option does not work.
If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
sun.net.www. content.text.PlainTextInputStream@9ea09ea
in the header instead.
I suspect that the AnnotationProcessor is essentially doing:
URL headerurl = new URL(<openjpa.header value>);
String newHeaderComment = headerurl.getContent().toString();
The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
Then the toString() call just returns the string representation of the instance of the InputStream object.
I think the AnnotationProcessor should read from the stream instead?
was:
The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
-Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
This option does not work.
If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
<code> sun.net.www.content.text.PlainTextInputStream@9ea09ea </code>
in the header instead.
I suspect that the AnnotationProcessor is essentially doing:
URL headerurl = new URL(<openjpa.header value>);
String newHeaderComment = headerurl.getContent().toString();
The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
Then the toString() call just returns the string representation of the instance of the InputStream object.
I think the AnnotationProcessor should read from the stream instead?
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance
> Affects Versions: 2.0.1, 2.1.1
> Environment: Any
> Reporter: Dale Lane
> Priority: Trivial
> Labels: openjpa
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENJPA-2044) Invalid header in MetaModel
classes generated by AnnotationProcessor
Posted by "Kevin Sutter (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126011#comment-13126011 ]
Kevin Sutter commented on OPENJPA-2044:
---------------------------------------
Dale was right on with his comments. The openjpa.header property on the AnnotationProcessor was not being processed correctly. I am in the process of correcting this.
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance
> Affects Versions: 2.0.1, 2.1.1
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENJPA-2044) Invalid header in MetaModel classes
generated by AnnotationProcessor
Posted by "Kevin Sutter (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Sutter updated OPENJPA-2044:
----------------------------------
Component/s: (was: Enhance)
criteria
Affects Version/s: 2.2.0
Fix Version/s: 2.2.0
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.0.1, 2.1.1, 2.2.0
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Fix For: 2.2.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (OPENJPA-2044) Invalid header in MetaModel
classes generated by AnnotationProcessor
Posted by "Pinaki Poddar (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13126563#comment-13126563 ]
Pinaki Poddar commented on OPENJPA-2044:
----------------------------------------
If you are fixing this, please put the fix of reading the content of an URL into openjpa-lib/...../Files.java
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.0.1, 2.1.1, 2.2.0
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Fix For: 2.2.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (OPENJPA-2044) Invalid header in MetaModel classes
generated by AnnotationProcessor
Posted by "Dale Lane (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dale Lane updated OPENJPA-2044:
-------------------------------
Description:
The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
-Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
This option does not work.
If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
<code> sun.net.www.content.text.PlainTextInputStream@9ea09ea </code>
in the header instead.
I suspect that the AnnotationProcessor is essentially doing:
URL headerurl = new URL(<openjpa.header value>);
String newHeaderComment = headerurl.getContent().toString();
The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
Then the toString() call just returns the string representation of the instance of the InputStream object.
I think the AnnotationProcessor should read from the stream instead?
was:
The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
-Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
This option does not work.
If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
sun.net.www.content.text.PlainTextInputStream@9ea09ea
in the header instead.
I suspect that the AnnotationProcessor is essentially doing:
URL headerurl = new URL(<openjpa.header value>);
String newHeaderComment = headerurl.getContent().toString();
The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
Then the toString() call just returns the string representation of the instance of the InputStream object.
I think the AnnotationProcessor should read from the stream instead?
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: Enhance
> Affects Versions: 2.0.1, 2.1.1
> Environment: Any
> Reporter: Dale Lane
> Priority: Trivial
> Labels: openjpa
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> <code> sun.net.www.content.text.PlainTextInputStream@9ea09ea </code>
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (OPENJPA-2044) Invalid header in MetaModel
classes generated by AnnotationProcessor
Posted by "Kevin Sutter (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-2044?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Sutter resolved OPENJPA-2044.
-----------------------------------
Resolution: Fixed
Resolved in trunk (2.2.0-SNAPSHOT).
> Invalid header in MetaModel classes generated by AnnotationProcessor
> --------------------------------------------------------------------
>
> Key: OPENJPA-2044
> URL: https://issues.apache.org/jira/browse/OPENJPA-2044
> Project: OpenJPA
> Issue Type: Bug
> Components: criteria
> Affects Versions: 2.0.1, 2.1.1, 2.2.0
> Environment: Any
> Reporter: Dale Lane
> Assignee: Kevin Sutter
> Priority: Trivial
> Labels: openjpa
> Fix For: 2.2.0
>
> Original Estimate: 0.5h
> Remaining Estimate: 0.5h
>
> The documentation at http://openjpa.apache.org/builds/latest/docs/manual/ch13s04.html talks about an option available in org.apache.openjpa.persistence.meta.AnnotationProcessor6:
> -Aopenjpa.header=<url> : A url whose content will appear as comment header to the generated file(s).
> This option does not work.
> If I give it a URL - either an http or a file URL - it doesn't put the contents from these URLs into the header of the generated files. It puts something like:
> sun.net.www. content.text.PlainTextInputStream@9ea09ea
> in the header instead.
> I suspect that the AnnotationProcessor is essentially doing:
> URL headerurl = new URL(<openjpa.header value>);
> String newHeaderComment = headerurl.getContent().toString();
> The getContent() is returning an InputStream - as documented here in the absence of a content handler factory: http://download.oracle.com/javase/6/docs/api/java/net/URLConnection.html#getContent()
> Then the toString() call just returns the string representation of the instance of the InputStream object.
> I think the AnnotationProcessor should read from the stream instead?
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira