Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [eclipselink-dev] Unexpected AssertError - cannot reproduce - c:/dir with spaces/META-INF/persistence.xml resolves fine in windows

	Hi, could I ask that you zip up your Eclipse project or a test project that reproduces your problem.
	Since we are both running Vista on JDK6, we will import your project and see if we can get the same problem here.
	I am running Ganymede 3.4M5, I have a 3.3 europa version - let us know which eclipse version you are running.
	thank you

-----Original Message-----
From: John Fisher [mailto:fisher23@xxxxxxxx]
Sent: Thursday, June 26, 2008 11:03 AM
To: Dev mailing list for Eclipse Persistence Services
Subject: RE: [eclipselink-dev] Unexpected AssertError - cannot reproduce
- c:/dir with spaces/META-INF/persistence.xml resolves fine in windows

Also, for what it's worth, I'm getting this exception on Vista.


-----Original Message-----
From: eclipselink-dev-bounces@xxxxxxxxxxx
[mailto:eclipselink-dev-bounces@xxxxxxxxxxx] On Behalf Of
Sent: Wednesday, June 25, 2008 5:19 PM
To: Dev mailing list for Eclipse Persistence Services
Subject: RE: [eclipselink-dev] Unexpected AssertError - cannot reproduce -
c:/dir with spaces/META-INF/persistence.xml resolves fine in windows

	Hi, I would like to work with you to resolve this issue, but I
cannot at this time reproduce it on windows - this test scenario still
passes, I will try jdk6_u10.

	1)	I ran one of my original test cases that matches the
scenario of users that are constrained to create eclipse projects off their
c:/documents and settings/ directory.  I am unable to reproduce your error.
I work fine with a space in the file path of a J2SE JPA eclipse project.
		The error that this original 2008/03 fix addressed was based
on a key:value mismatch on %20 vs " " - you have a different scenario that
is earlier in the code path.

-----------------ReTesting Output--------------------- See attached jpg for
a view of the eclipse test project

Source pu:
C:\wse\w34\stat  JPA\src\META-INF\persistence.xml Runtime pu:
C:\wse\w34\stat  JPA\build\classes\META-INF\persistence.xml

Logs running on M9, Windows Vista, JDK 1.6.0_04-b12 in J2SE RESOURCE_LOCAL

[EL Info]: 2008.06.25
/wse/w34/stat%20%20JPA/build/classes/-statJPA login successful [EL Finest]:
deploying Persistence Unit statJPA; state Deployed; factoryCount 1

----------------Debug Output--------------------------- As you can see, i
get past the assert to line 138 and end up processing the
133   public static URL computePURootURL(URL pxmlURL) throws IOException {
134        String protocol = pxmlURL.getProtocol();
135        if("file".equals(protocol)) { // NOI18N
136            // e.g. file:/tmp/META-INF/persistence.xml
137            assert(new File(pxmlURL.getFile()).isFile());
138            return new URL(pxmlURL, ".."); // NOI18N

with the following
puName	"file:/C:/wse/w34/stat  JPA/build/classes/statJPA" (id=57)	

org.eclipse.persistence.example.navigation.Introspector at localhost:57995

	Thread [main] (Suspended)	
		PersistenceUnitProcessor.computePURootURL(URL) line: 138

		PersistenceProvider.createEntityManagerFactory(String, Map,
ClassLoader) line: 98	
		PersistenceProvider.createEntityManagerFactory(String, Map)
line: 64	
		Persistence.createEntityManagerFactory(String, Map) line: 83

		Persistence.createEntityManagerFactory(String) line: 60	
		Introspector.configurePersistenceUnit(String, boolean) line:
		Introspector.initialize() line: 106	
		Introspector.main(String[]) line: 160	
pxmlURL	URL  (id=20)	
	authority	"" (id=23)	
"/C:/wse/w34/stat%20%20JPA/build/classes/META-INF/persistence.xml" (id=27)

	handler	Handler  (id=28)	
	hashCode	-1	
	host	"" (id=23)	
	hostAddress	null	
"/C:/wse/w34/stat%20%20JPA/build/classes/META-INF/persistence.xml" (id=27)

	port	-1	
	protocol	"file" (id=31)	
	query	null	
	ref	null	
	userInfo	null	

	2)	I also unit tested the code outside of EclipseLink in line
137 aFile.isFile() returns true for a file at the end of a file://dir with
spaces/ url
		The only way I could get the following code to fail is if
the xml file did not exist.

            URL pxmlURL = new URL("file://c:/_testing/space
            File aFile = new File(pxmlURL.getFile()); 

	Your error bothers me, if you have any more specific info on your
setup like your OS (linux or windows), the path to your persistence.xml and
if you are running inside eclipse as a SE run target it would be helpful in
fixing your issue.

	thank you

-----Original Message-----
From: GORDON.YORKE@xxxxxxxxxx
Sent: Wednesday, June 25, 2008 4:16 PM
To: Dev mailing list for Eclipse Persistence Services
Subject: Re: [eclipselink-dev] Unexpected AssertError

Hello John,
   There is a pre-existing bug which was fixed for 
jars but based on your report seems to be still broken for files.
Could you please reopen the bug and post your new findings.
Thank you,

vrmerlin wrote:
> We're evaluating EclipseLink as a potential JPA solution. When running M9
> an Eclipse project, I was getting the following error:
> Exception in thread "main" java.lang.AssertionError
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> 	at
> Looking down into the eclipselink source code, it appeared that
> was failing the isFile() test for the persistence.xml file it found. The
> reason it failed was because there was a space in the path to that file
> particular, my eclipse project name). When I created a new project
> a space), the problem went away and things went fine.
> It took quite some time to track down why I was getting this rather
> ambigious error, and I don't think I should have gotten it in the first
> place (OpenJPA and Hibernate didn't have any problems with my Eclipse
> project name at all). I'd really rather not put that artificial constraint
> on our developers.
> Having a space in the path to the persistence.xml file seems reasonable...
> however, I can't find much mention of anyone else having this problem. Any
> thoughts on how I might fix it?
> btw, I'm using JDK 6u10.
> Thanks,
> John
eclipselink-dev mailing list

eclipselink-dev mailing list

Back to the top