Home » Eclipse Projects » Dali » persistence.xml file not detected on restart
persistence.xml file not detected on restart [message #434466] |
Tue, 12 June 2007 21:15  |
Eclipse User |
|
|
|
To reproduce:
1) Choose a JPA project which has no validation issues. Restart eclipse.
2) Bring up the context menu for this project and select Validate.
3) Observe the "No persistence.xml file in project" error marker on the
project.
4) Invoke the Validate action again, marker disappears.
If I had opened an entity in the Java editor before step 2 and waited for
the JPA synchronization to complete, then validating the project in step 2
does not result in any markers for the project.
I used a bare bones JPA project with persistence.xml at
src/META-INF/persistence.xml under the project root. I tried with other JPA
projects and could still reproduce this issue.
Brian.
|
|
| | | |
Re: persistence.xml file not detected on restart [message #434536 is a reply to message #434532] |
Wed, 01 August 2007 22:16   |
Eclipse User |
|
|
|
Neil,
I don't recall if I have added a non-text annotation. I did add some
attributes. If it was non-string then it probably was a
@Temporal(TemporalType.DATE).
I have been having symptoms of Bug 195895 for quite some time and I
thought I had gotten past it that by removing "+" from the named queries
(making them cumbersome single line queries).
Right now I can't use Dali because of Bug 192675 and 195895.
I am not too familiar with WTP release process. Will 1.0.1 be part of WTP
2.0.1 or a later release ? Are any of Dali bug fixes includes in milestone
builds ?
thanks for all your help,
-Sanjay
Neil Hauge wrote:
> Sanjay,
> The persistence.xml validation error you are seeing is probably related to
> the bug mentioned above. In your case the error doesn't get cleared
> because when we try to build our model, we fail due to a problem reading
> one of your new annotation value entries. This is likely related to bug
> 195895. We are discovering that Dali is unable to read some annotation
> value usages, and in this case, the culprit appears to be
> org.eclipse.jdt.core.dom.QualifiedName.
> Did you recently add any annotation value that does not use a string
> literal? Something other than the standard @Foo(value="bar") or
> @Foo("bar").
> Neil
> Sanjay Kumar wrote:
>> I am seeing no persistence.xml in the project error - for a project that
>> was working fine. I made some minor entity changes - should not have cause
>> anything to break. But JPA validation fails. Could it have anything to do
>> with following exception in the logs ?
>> eclipse.buildId=I20070625-1500
>> java.version=1.5.0_12
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
>> Command-line arguments: -os win32 -ws win32 -arch x86
>> Error
>> Sat Jul 28 11:15:44 EDT 2007
>> An error occurred while traversing resources.
>> java.lang.ClassCastException: org.eclipse.jdt.core.dom.QualifiedName
>> at
>>
>
org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
>> at
>>
|
|
|
Re: persistence.xml file not detected on restart [message #434538 is a reply to message #434536] |
Fri, 03 August 2007 13:59  |
Eclipse User |
|
|
|
Sanjay,
The temporal setting you mention should be fine, since we handle this type
of setting without problem. Are there any instances of using constants in
your annotation values?
We are working on the fix for 195895 right now, so if things go well they
could be in a WTP I-Build in the near future. 1.0.1 will be a part of WTP
2.0.1 and yes, Dali bug fixes will be included in the milestone builds as
well. I think the best thing to do (in general for now) would be to check
out the most recent 2.0.1 I-Builds, since these would be more stable than
future milestone releases. The I-Builds are currently done every 2 weeks
and can be found here - http://download.eclipse.org/webtools/downloads/
I think once we have all the related issues for 195895 fixed, 192675 won't
be as problematic.
Thanks for helping us investigate these issues.
Neil
Sanjay Kumar wrote:
> Neil,
> I don't recall if I have added a non-text annotation. I did add some
> attributes. If it was non-string then it probably was a
> @Temporal(TemporalType.DATE).
> I have been having symptoms of Bug 195895 for quite some time and I
> thought I had gotten past it that by removing "+" from the named queries
> (making them cumbersome single line queries).
> Right now I can't use Dali because of Bug 192675 and 195895.
> I am not too familiar with WTP release process. Will 1.0.1 be part of WTP
> 2.0.1 or a later release ? Are any of Dali bug fixes includes in milestone
> builds ?
> thanks for all your help,
> -Sanjay
> Neil Hauge wrote:
>> Sanjay,
>> The persistence.xml validation error you are seeing is probably related to
>> the bug mentioned above. In your case the error doesn't get cleared
>> because when we try to build our model, we fail due to a problem reading
>> one of your new annotation value entries. This is likely related to bug
>> 195895. We are discovering that Dali is unable to read some annotation
>> value usages, and in this case, the culprit appears to be
>> org.eclipse.jdt.core.dom.QualifiedName.
>> Did you recently add any annotation value that does not use a string
>> literal? Something other than the standard @Foo(value="bar") or
>> @Foo("bar").
>> Neil
>> Sanjay Kumar wrote:
>>> I am seeing no persistence.xml in the project error - for a project that
>>> was working fine. I made some minor entity changes - should not have cause
>>> anything to break. But JPA validation fails. Could it have anything to do
>>> with following exception in the logs ?
>>> eclipse.buildId=I20070625-1500
>>> java.version=1.5.0_12
>>> java.vendor=Sun Microsystems Inc.
>>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
>>> Command-line arguments: -os win32 -ws win32 -arch x86
>>> Error
>>> Sat Jul 28 11:15:44 EDT 2007
>>> An error occurred while traversing resources.
>>> java.lang.ClassCastException: org.eclipse.jdt.core.dom.QualifiedName
>>> at
>>>
>>
>
org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
>>> at
>>>
|
|
| |
Re: persistence.xml file not detected on restart [message #605078 is a reply to message #434475] |
Sat, 28 July 2007 11:39  |
Eclipse User |
|
|
|
I am seeing no persistence.xml in the project error - for a project that
was working fine. I made some minor entity changes - should not have cause
anything to break. But JPA validation fails. Could it have anything to do
with following exception in the logs ?
eclipse.buildId=I20070625-1500
java.version=1.5.0_12
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments: -os win32 -ws win32 -arch x86
Error
Sat Jul 28 11:15:44 EDT 2007
An error occurred while traversing resources.
java.lang.ClassCastException: org.eclipse.jdt.core.dom.QualifiedName
at
org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
at
org.eclipse.jpt.core.internal.jdtutility.AbstractExpressionC onverter.convert(AbstractExpressionConverter.java:40)
at
org.eclipse.jpt.core.internal.jdtutility.ConversionDeclarati onAnnotationElementAdapter.getValue(ConversionDeclarationAnn otationElementAdapter.java:95)
at
org.eclipse.jpt.core.internal.jdtutility.MemberAnnotationEle mentAdapter.getValue(MemberAnnotationElementAdapter.java:43)
at
org.eclipse.jpt.core.internal.jdtutility.ShortCircuitAnnotat ionElementAdapter.getValue(ShortCircuitAnnotationElementAdap ter.java:47)
at
org.eclipse.jpt.core.internal.content.java.mappings.JavaEnti ty.updateFromJava(JavaEntity.java:2384)
at
org.eclipse.jpt.core.internal.content.java.JavaPersistentTyp e.updateFromJava(JavaPersistentType.java:670)
at
org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.synchronizePersistentTypes(JpaCompilationUnit.java:406)
at
org.eclipse.jpt.core.internal.content.java.JpaCompilationUni t.setFile(JpaCompilationUnit.java:325)
at
org.eclipse.jpt.core.internal.content.java.JavaJpaFileConten tProvider.buildRootContent(JavaJpaFileContentProvider.java:3 0)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.buildCo ntent(JpaFileContentRegistry.java:60)
at
org.eclipse.jpt.core.internal.JpaFileContentRegistry.getFile (JpaFileContentRegistry.java:44)
at
org.eclipse.jpt.core.internal.JpaProject.createJpaFile(JpaPr oject.java:630)
at org.eclipse.jpt.core.internal.JpaProject$3.visit(JpaProject. java:497)
at
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:85)
at
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:126)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
at org.eclipse.jpt.core.internal.JpaProject.fill(JpaProject.jav a:504)
at
org.eclipse.jpt.core.internal.JpaModelManager.fillJpaProject (JpaModelManager.java:180)
at org.eclipse.jpt.core.internal.JpaModel$1.visit(JpaModel.java :152)
at
org.eclipse.core.internal.resources.Resource$1.visitElement( Resource.java:57)
at
org.eclipse.core.internal.watson.ElementTreeIterator.doItera tion(ElementTreeIterator.java:81)
at
org.eclipse.core.internal.watson.ElementTreeIterator.iterate (ElementTreeIterator.java:119)
at org.eclipse.core.internal.resources.Resource.accept(Resource .java:67)
at org.eclipse.jpt.core.internal.JpaModel.fill(JpaModel.java:15 8)
at
org.eclipse.jpt.core.internal.JpaModelManager$WorkspaceBuild Job$1.run(JpaModelManager.java:260)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1797)
at org.eclipse.core.internal.resources.Workspace.run(Workspace. java:1779)
at
org.eclipse.jpt.core.internal.JpaModelManager$WorkspaceBuild Job.run(JpaModelManager.java:257)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
|
|
|
Re: persistence.xml file not detected on restart [message #605092 is a reply to message #434529] |
Tue, 31 July 2007 09:43  |
Eclipse User |
|
|
|
Sanjay,
The persistence.xml validation error you are seeing is probably related to
the bug mentioned above. In your case the error doesn't get cleared
because when we try to build our model, we fail due to a problem reading
one of your new annotation value entries. This is likely related to bug
195895. We are discovering that Dali is unable to read some annotation
value usages, and in this case, the culprit appears to be
org.eclipse.jdt.core.dom.QualifiedName.
Did you recently add any annotation value that does not use a string
literal? Something other than the standard @Foo(value="bar") or
@Foo("bar").
Neil
Sanjay Kumar wrote:
> I am seeing no persistence.xml in the project error - for a project that
> was working fine. I made some minor entity changes - should not have cause
> anything to break. But JPA validation fails. Could it have anything to do
> with following exception in the logs ?
> eclipse.buildId=I20070625-1500
> java.version=1.5.0_12
> java.vendor=Sun Microsystems Inc.
> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
> Command-line arguments: -os win32 -ws win32 -arch x86
> Error
> Sat Jul 28 11:15:44 EDT 2007
> An error occurred while traversing resources.
> java.lang.ClassCastException: org.eclipse.jdt.core.dom.QualifiedName
> at
>
org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
> at
>
|
|
|
Re: persistence.xml file not detected on restart [message #605110 is a reply to message #434532] |
Wed, 01 August 2007 22:16  |
Eclipse User |
|
|
|
Neil,
I don't recall if I have added a non-text annotation. I did add some
attributes. If it was non-string then it probably was a
@Temporal(TemporalType.DATE).
I have been having symptoms of Bug 195895 for quite some time and I
thought I had gotten past it that by removing "+" from the named queries
(making them cumbersome single line queries).
Right now I can't use Dali because of Bug 192675 and 195895.
I am not too familiar with WTP release process. Will 1.0.1 be part of WTP
2.0.1 or a later release ? Are any of Dali bug fixes includes in milestone
builds ?
thanks for all your help,
-Sanjay
Neil Hauge wrote:
> Sanjay,
> The persistence.xml validation error you are seeing is probably related to
> the bug mentioned above. In your case the error doesn't get cleared
> because when we try to build our model, we fail due to a problem reading
> one of your new annotation value entries. This is likely related to bug
> 195895. We are discovering that Dali is unable to read some annotation
> value usages, and in this case, the culprit appears to be
> org.eclipse.jdt.core.dom.QualifiedName.
> Did you recently add any annotation value that does not use a string
> literal? Something other than the standard @Foo(value="bar") or
> @Foo("bar").
> Neil
> Sanjay Kumar wrote:
>> I am seeing no persistence.xml in the project error - for a project that
>> was working fine. I made some minor entity changes - should not have cause
>> anything to break. But JPA validation fails. Could it have anything to do
>> with following exception in the logs ?
>> eclipse.buildId=I20070625-1500
>> java.version=1.5.0_12
>> java.vendor=Sun Microsystems Inc.
>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
>> Command-line arguments: -os win32 -ws win32 -arch x86
>> Error
>> Sat Jul 28 11:15:44 EDT 2007
>> An error occurred while traversing resources.
>> java.lang.ClassCastException: org.eclipse.jdt.core.dom.QualifiedName
>> at
>>
>
org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
>> at
>>
|
|
|
Re: persistence.xml file not detected on restart [message #605122 is a reply to message #434536] |
Fri, 03 August 2007 13:59  |
Eclipse User |
|
|
|
Sanjay,
The temporal setting you mention should be fine, since we handle this type
of setting without problem. Are there any instances of using constants in
your annotation values?
We are working on the fix for 195895 right now, so if things go well they
could be in a WTP I-Build in the near future. 1.0.1 will be a part of WTP
2.0.1 and yes, Dali bug fixes will be included in the milestone builds as
well. I think the best thing to do (in general for now) would be to check
out the most recent 2.0.1 I-Builds, since these would be more stable than
future milestone releases. The I-Builds are currently done every 2 weeks
and can be found here - http://download.eclipse.org/webtools/downloads/
I think once we have all the related issues for 195895 fixed, 192675 won't
be as problematic.
Thanks for helping us investigate these issues.
Neil
Sanjay Kumar wrote:
> Neil,
> I don't recall if I have added a non-text annotation. I did add some
> attributes. If it was non-string then it probably was a
> @Temporal(TemporalType.DATE).
> I have been having symptoms of Bug 195895 for quite some time and I
> thought I had gotten past it that by removing "+" from the named queries
> (making them cumbersome single line queries).
> Right now I can't use Dali because of Bug 192675 and 195895.
> I am not too familiar with WTP release process. Will 1.0.1 be part of WTP
> 2.0.1 or a later release ? Are any of Dali bug fixes includes in milestone
> builds ?
> thanks for all your help,
> -Sanjay
> Neil Hauge wrote:
>> Sanjay,
>> The persistence.xml validation error you are seeing is probably related to
>> the bug mentioned above. In your case the error doesn't get cleared
>> because when we try to build our model, we fail due to a problem reading
>> one of your new annotation value entries. This is likely related to bug
>> 195895. We are discovering that Dali is unable to read some annotation
>> value usages, and in this case, the culprit appears to be
>> org.eclipse.jdt.core.dom.QualifiedName.
>> Did you recently add any annotation value that does not use a string
>> literal? Something other than the standard @Foo(value="bar") or
>> @Foo("bar").
>> Neil
>> Sanjay Kumar wrote:
>>> I am seeing no persistence.xml in the project error - for a project that
>>> was working fine. I made some minor entity changes - should not have cause
>>> anything to break. But JPA validation fails. Could it have anything to do
>>> with following exception in the logs ?
>>> eclipse.buildId=I20070625-1500
>>> java.version=1.5.0_12
>>> java.vendor=Sun Microsystems Inc.
>>> BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
>>> Command-line arguments: -os win32 -ws win32 -arch x86
>>> Error
>>> Sat Jul 28 11:15:44 EDT 2007
>>> An error occurred while traversing resources.
>>> java.lang.ClassCastException: org.eclipse.jdt.core.dom.QualifiedName
>>> at
>>>
>>
>
org.eclipse.jpt.core.internal.jdtutility.StringExpressionCon verter.convert_(StringExpressionConverter.java:1)
>>> at
>>>
|
|
|
Goto Forum:
Current Time: Tue Jul 22 18:04:17 EDT 2025
Powered by FUDForum. Page generated in 0.05566 seconds
|