You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Jayaram Subramanian <rs...@gmail.com> on 2010/04/06 12:46:27 UTC

Re: Fwd: Suites.All

Hi All,
As per discussion with Bryan Myrna and Kathy, I did
ant clobber,
rm -rf  jars/*
ant all
ant buildjars
java -Dderby.tests.trace=true junit.textui.TestRunner
org.apache.derbyTesting.functionTests.tests.derbynet.SysinfoTest >
runoutput.out 2>&1

It still kept giving the same issue. For debugging i decided to add
Sys.out.println's suggested by Bryan in the Sysinfotest code.But this
time when i load up the project in eclipse i am not able to see the
SysInfoTest.java file in derbynet folder in eclipse. So i am not able
to add the System.out.println statements as pointed out by Bryan. I am
attaching screenshot of my project explorer view.

With Regards
Jayaram


On Thu, Apr 1, 2010 at 9:31 PM, Jayaram Subramanian <rs...@gmail.com> wrote:
>
> Hi Bryan,
> I tried the buildjars but ended up with the issue below..
>
> C:\java\derby\source\trunk\build.xml:1329: Unable to rename old file (C:\java\de
> rby\source\trunk\jars\sane\derby.jar) to temporary file
>
> I tried checking permissions on folder c:\java\source\derby\trunk but everything was ok.
>
> With Regards
> Jayaram
>
> On Wed, Mar 31, 2010 at 8:39 AM, Bryan Pendleton <bp...@gmail.com> wrote:
>>
>> Jayaram Subramanian wrote:
>>>
>>> Hi Bryan,
>>> I wrote the System.out.println code as suggested into SysInfoTest.java file and tried running java -Dderby.tests.trace=true junit.textui.TestRunner org.apache.derbyTesting.functionTests.tests.derbynet.SysinfoTest > runoutput.out 2>&1.
>>>
>>> But the System.out.println outputs never got printed on the out file. But still i got the same Assertion errors in the out file... Since i got a doubt, i even removed the SysInfoTest.java file from the derbynet folder and tried running the java command expecting it to give "source not found" kind of a issue. But still the java command ran and gave the same errors as noted earlier. Is the file cached somewhere else in the system. I tried doing a search but could locate only 1 existance of the file in derbynet folder.
>>
>> junit will run the class from your class path, so use:
>>
>>  echo $CLASSPATH
>>
>> to figure out where your classpath is pointing.
>>
>> After modifying SysInfoTest.java, you'll need to do:
>>
>>  ant all
>>
>> and, if your classpath is pointing at the jar files:
>>
>>  ant buildjars
>>
>> You should definitely see your print statements in the output of your junit test
>> command, and the syntax of your junit test command looks fine to me, so I
>> suspect this is just a build problem.
>>
>> thanks,
>>
>> bryan
>

Re: Fwd: Suites.All

Posted by Myrna van Lunteren <m....@gmail.com>.
On Tue, Apr 6, 2010 at 7:25 AM, Jayaram Subramanian <rs...@gmail.com> wrote:
> Thanks Bryan,
> Yes i do see the file in the file system .. but it doesnt come up in
> eclipse environment
>
> With Regards
> Jayaram
>
> On Tue, Apr 6, 2010 at 10:13 AM, Bryan Pendleton
> <bp...@gmail.com> wrote:
>> Jayaram Subramanian wrote:
>>>
>>> It still kept giving the same issue. For debugging i decided to add
>>> Sys.out.println's suggested by Bryan in the Sysinfotest code.But this
>>> time when i load up the project in eclipse i am not able to see the
>>> SysInfoTest.java file in derbynet folder in eclipse. So i am not able
>>> to add the System.out.println statements as pointed out by Bryan. I am
>>> attaching screenshot of my project explorer view.
>>
>> That's odd. I don't have an explanation for why this might be.
>>
>> What happens if you look at your filesystem via a tool other than Eclipse?
>>
>> For example, open a shell/cmd window and navigate to
>>
>>  .../java/testing/org/apache/derbyTesting/functionTests/tests/derbynet
>>
>> and run "ls" or "dir" (depending on your operating system).
>>
>> I can't think of any reason for SysinfoTest.java to disappear from this
>> folder on your filesystem.
>>
>> What does "svn stat" say about this folder?
>>
>> thanks,
>>
>> bryan
>>
>

In addition to checking with svn stat, have you tried 'refresh'
recently in Eclipse (highlight the 'trunk' tree, then press F5, or
right click and find refresh on the menu)?
Although the test has been in existence for a long time, maybe
something happened to it at one point and you refreshed at the time...

It's peculiar...

Myrna

Re: Fwd: Suites.All

Posted by Myrna van Lunteren <m....@gmail.com>.
On Thu, Apr 8, 2010 at 3:52 AM, Jayaram Subramanian <rs...@gmail.com> wrote:
> Thanks Kathy,
> You were right,, My classpaths were different between dos and CYGWIN
> envuiroments... When i made both the same i was able to run the
> SysInfo with the following results
>
> .
> testSysinfo used 1203 ms .
> testSysinfoMethod used 67 ms .
> testSysinfoLocale used 943 ms .
> testSysinfo used 1162 ms .
> testSysinfoMethod used 64 ms .
> testSysinfoLocale used 1048 ms
> Time: 11.667
>
> OK (6 tests)
>
>
> On Wed, Apr 7, 2010 at 8:23 AM, Kathey Marsden
> <km...@sbcglobal.net> wrote:
>> Jayaram Subramanian wrote:
>>>
>>>  This
>>> indicates to me that there was a security exception on the the jars
>>> folder... I tried modifying the permissions on the jars folder.. but
>>> still continued to get the same error.
>>> --------- Derby Information --------
>>> [Java Security Exception: access denied (java.io.FilePermission
>>> C:\java\Derby\source\trunk\jars\sane\derbyLocale_cs.jar
>>>  read)] <null>
>>>
>>
>> This is very interesting.   Because sysinfo is in multiple jars, I have seen
>> issues in the past where the policy file does not provide sysinfo proper
>> permissions and the order of the classpath can have an impact.  Can you send
>> your classpath in both the DOS environment where the test passes and your
>> Cygwin environment where it fails?
>>
>>
>>
>>
>

Hi Jayaram,

I'm glad you figured out the difference...

That said, it may be worthwhile logging a low-priority bug against the
SysinfoTest, perhaps it's possible to adjust the test so it will work
correctly with either classpath.

Myrna

Re: Fwd: Suites.All

Posted by Jayaram Subramanian <rs...@gmail.com>.
Thanks Kathy,
You were right,, My classpaths were different between dos and CYGWIN
envuiroments... When i made both the same i was able to run the
SysInfo with the following results

.
testSysinfo used 1203 ms .
testSysinfoMethod used 67 ms .
testSysinfoLocale used 943 ms .
testSysinfo used 1162 ms .
testSysinfoMethod used 64 ms .
testSysinfoLocale used 1048 ms
Time: 11.667

OK (6 tests)


On Wed, Apr 7, 2010 at 8:23 AM, Kathey Marsden
<km...@sbcglobal.net> wrote:
> Jayaram Subramanian wrote:
>>
>>  This
>> indicates to me that there was a security exception on the the jars
>> folder... I tried modifying the permissions on the jars folder.. but
>> still continued to get the same error.
>> --------- Derby Information --------
>> [Java Security Exception: access denied (java.io.FilePermission
>> C:\java\Derby\source\trunk\jars\sane\derbyLocale_cs.jar
>>  read)] <null>
>>
>
> This is very interesting.   Because sysinfo is in multiple jars, I have seen
> issues in the past where the policy file does not provide sysinfo proper
> permissions and the order of the classpath can have an impact.  Can you send
> your classpath in both the DOS environment where the test passes and your
> Cygwin environment where it fails?
>
>
>
>

Re: Fwd: Suites.All

Posted by Kathey Marsden <km...@sbcglobal.net>.
Jayaram Subramanian wrote:
>  This
> indicates to me that there was a security exception on the the jars
> folder... I tried modifying the permissions on the jars folder.. but
> still continued to get the same error.
> --------- Derby Information --------
> [Java Security Exception: access denied (java.io.FilePermission
> C:\java\Derby\source\trunk\jars\sane\derbyLocale_cs.jar
>  read)] <null>
>   
This is very interesting.   Because sysinfo is in multiple jars, I have 
seen issues in the past where the policy file does not provide sysinfo 
proper permissions and the order of the classpath can have an impact.  
Can you send your classpath in both the DOS environment where the test 
passes and your Cygwin environment where it fails?




Re: Fwd: Suites.All

Posted by Jayaram Subramanian <rs...@gmail.com>.
Hi All,
Please find the results after placing debug statements . This
indicates to me that there was a security exception on the the jars
folder... I tried modifying the permissions on the jars folder.. but
still continued to get the same error.

With Regards
Jayaram

testSysinfo Expected 14 lines, but actually have 15
EXPECTED:
--------- Derby Network Server Information --------
derby.drda.maxThreads=0
derby.drda.sslMode=off
derby.drda.keepAlive=true
derby.drda.minThreads=0
derby.drda.portNumber=1527
derby.drda.logConnections=false
derby.drda.timeSlice=0
derby.drda.startNetworkServer=false
derby.drda.traceAll=false
--------- Derby Information --------
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------
ACTUAL:
--------- Derby Network Server Information --------
derby.drda.maxThreads=0
derby.drda.sslMode=off
derby.drda.keepAlive=true
derby.drda.minThreads=0
derby.drda.portNumber=1527
derby.drda.logConnections=false
derby.drda.timeSlice=0
derby.drda.startNetworkServer=false
derby.drda.traceAll=false
--------- Derby Information --------
[Java Security Exception: access denied (java.io.FilePermission
C:\java\Derby\source\trunk\jars\sane\derbyLocale_cs.jar
 read)] <null>
------------------------------------------------------
----------------- Locale Information -----------------
------------------------------------------------------

With Regards
Jayaram


On Tue, Apr 6, 2010 at 12:13 PM, Kathey Marsden
<km...@sbcglobal.net> wrote:
> Jayaram Subramanian wrote:
>>
>> Thanks Bryan,
>> Yes i do see the file in the file system .. but it doesnt come up in
>> eclipse environment
>>
>
> Try first to refresh the project by pressing [F5] or right click on trunk
> and choose refresh. If that does not work, Open the file by choosing from
> the drop down menu [File] [Open File] and then drilling down to the file.
>
>
>

Re: Fwd: Suites.All

Posted by Kathey Marsden <km...@sbcglobal.net>.
Jayaram Subramanian wrote:
> Thanks Bryan,
> Yes i do see the file in the file system .. but it doesnt come up in
> eclipse environment
>   
Try first to refresh the project by pressing [F5] or right click on 
trunk and choose refresh. If that does not work, Open the file by 
choosing from the drop down menu [File] [Open File] and then drilling 
down to the file.



Re: Fwd: Suites.All

Posted by Jayaram Subramanian <rs...@gmail.com>.
Thanks Bryan,
Yes i do see the file in the file system .. but it doesnt come up in
eclipse environment

With Regards
Jayaram

On Tue, Apr 6, 2010 at 10:13 AM, Bryan Pendleton
<bp...@gmail.com> wrote:
> Jayaram Subramanian wrote:
>>
>> It still kept giving the same issue. For debugging i decided to add
>> Sys.out.println's suggested by Bryan in the Sysinfotest code.But this
>> time when i load up the project in eclipse i am not able to see the
>> SysInfoTest.java file in derbynet folder in eclipse. So i am not able
>> to add the System.out.println statements as pointed out by Bryan. I am
>> attaching screenshot of my project explorer view.
>
> That's odd. I don't have an explanation for why this might be.
>
> What happens if you look at your filesystem via a tool other than Eclipse?
>
> For example, open a shell/cmd window and navigate to
>
>  .../java/testing/org/apache/derbyTesting/functionTests/tests/derbynet
>
> and run "ls" or "dir" (depending on your operating system).
>
> I can't think of any reason for SysinfoTest.java to disappear from this
> folder on your filesystem.
>
> What does "svn stat" say about this folder?
>
> thanks,
>
> bryan
>

Re: Fwd: Suites.All

Posted by Bryan Pendleton <bp...@gmail.com>.
Jayaram Subramanian wrote:
> It still kept giving the same issue. For debugging i decided to add
> Sys.out.println's suggested by Bryan in the Sysinfotest code.But this
> time when i load up the project in eclipse i am not able to see the
> SysInfoTest.java file in derbynet folder in eclipse. So i am not able
> to add the System.out.println statements as pointed out by Bryan. I am
> attaching screenshot of my project explorer view.

That's odd. I don't have an explanation for why this might be.

What happens if you look at your filesystem via a tool other than Eclipse?

For example, open a shell/cmd window and navigate to

   .../java/testing/org/apache/derbyTesting/functionTests/tests/derbynet

and run "ls" or "dir" (depending on your operating system).

I can't think of any reason for SysinfoTest.java to disappear from this
folder on your filesystem.

What does "svn stat" say about this folder?

thanks,

bryan