You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-user@db.apache.org by John Baker <Jo...@Sun.COM> on 2007/08/23 02:25:29 UTC

Trouble using JavaDB in Glassfish V2

I'm having a really difficult time using Java DB in Glassfish .

I'm trying to the ij command from the commandline.

There are 2 installations of ij.bat under frameworks

There is no installation of ij in javadb/bin
(there is no bin folder)

If the ij.bat script is used (under frameworks) then I get the error below

$ ij

The frameworks scripts have been deprecated. Please use the new scripts in

the /bin directory. See the file frameworks.DEPRECATED.txt for more

information.

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/derby/tools/ij


So, there should be a bin folder for the Glassfish V2 installation ?

Thanks,
John

Re: Trouble using JavaDB in Glassfish V2

Posted by Kim Haase <Ca...@Sun.COM>.
Kristian Waagan wrote:
> John Embretsen wrote:
>> Kristian Waagan wrote:
>>> John Baker wrote:
>>>> There are 2 installations of ij.bat under frameworks
>>>>
>>>> There is no installation of ij in javadb/bin
>>>> (there is no bin folder)
>>
>>>> So, there should be a bin folder for the Glassfish V2 installation ?
>>
>> Glassfish v2 bundles Java DB 10.2.2.1, which should include a bin 
>> folder, yes. I don't know if the fact that it is missing is just a 
>> mistake or if the glassfish folks have a reason for not including it.
>>
>>> Since the version is 10.2 you can't use derbyrun.jar (java -jar 
>>> derbyrun.jar ij).
>>
>> Hmm, all 10.2 versions include derbyrun.jar, don't they?
>> Try 'java -jar glassfish\javadb\lib\derbyrun.jar ij'.
> 
> Sorry I got confused, because the version in Glassfish build 58b 
> (Solaris package) does not include derbyrun.jar.
> 
> In proper distributions, there should be a derbyrun.jar for Derby 10.2 
> (and later) as you say.

The version of Java DB in the current build, Glassfish build b58c 
(Glassfish V2 Release Candidate 4) does include lib\derbyrun.jar, at 
least in the Windows distribution.

Kim

Re: Trouble using JavaDB in Glassfish V2

Posted by Kristian Waagan <Kr...@Sun.COM>.
John Embretsen wrote:
> Kristian Waagan wrote:
>> John Baker wrote:
>>> There are 2 installations of ij.bat under frameworks
>>>
>>> There is no installation of ij in javadb/bin
>>> (there is no bin folder)
> 
>>> So, there should be a bin folder for the Glassfish V2 installation ?
> 
> Glassfish v2 bundles Java DB 10.2.2.1, which should include a bin 
> folder, yes. I don't know if the fact that it is missing is just a 
> mistake or if the glassfish folks have a reason for not including it.
> 
>> Since the version is 10.2 you can't use derbyrun.jar (java -jar 
>> derbyrun.jar ij).
> 
> Hmm, all 10.2 versions include derbyrun.jar, don't they?
> Try 'java -jar glassfish\javadb\lib\derbyrun.jar ij'.

Sorry I got confused, because the version in Glassfish build 58b 
(Solaris package) does not include derbyrun.jar.

In proper distributions, there should be a derbyrun.jar for Derby 10.2 
(and later) as you say.


-- 
Kristian

> 
> 


Re: Trouble using JavaDB in Glassfish V2

Posted by John Embretsen <Jo...@Sun.COM>.
Kristian Waagan wrote:
> John Baker wrote:
>> There are 2 installations of ij.bat under frameworks
>>
>> There is no installation of ij in javadb/bin
>> (there is no bin folder)

>> So, there should be a bin folder for the Glassfish V2 installation ?

Glassfish v2 bundles Java DB 10.2.2.1, which should include a bin folder, yes. I 
don't know if the fact that it is missing is just a mistake or if the glassfish 
folks have a reason for not including it.

> Since the version is 10.2 you can't use derbyrun.jar (java -jar 
> derbyrun.jar ij).

Hmm, all 10.2 versions include derbyrun.jar, don't they?
Try 'java -jar glassfish\javadb\lib\derbyrun.jar ij'.


-- 
John


Re: Trouble using JavaDB in Glassfish V2

Posted by Kristian Waagan <Kr...@Sun.COM>.
John Baker wrote:
> 
> I'm having a really difficult time using Java DB in Glassfish .
> 
> I'm trying to the ij command from the commandline.
> 
> There are 2 installations of ij.bat under frameworks
> 
> There is no installation of ij in javadb/bin
> (there is no bin folder)
> 
> If the ij.bat script is used (under frameworks) then I get the error below
> 
> $ ij
> 
> The frameworks scripts have been deprecated. Please use the new scripts in
> 
> the /bin directory. See the file frameworks.DEPRECATED.txt for more
> 
> information.
> 
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> org/apache/derby/tools/ij
> 
> 
> So, there should be a bin folder for the Glassfish V2 installation ?

Hello John,

I don't use Windows much, but I had a look at Glassfish V2 (build 58b) 
on Solaris.
By setting DERBY_HOME (or DERBY_INSTALL) I was able to use the scripts 
under the frameworks directory, but the deprecation warning still appeared.

Did you specify either one of the environment variables mentioned above?
Regarding the classpath, could there be a bug in the Windows scripts?
Is it already logged in Jira? (I seem to remember some problems with the 
.bat scripts)

Since the version is 10.2 you can't use derbyrun.jar (java -jar 
derbyrun.jar ij). If you want to start ij manually, you can do this;

java -classpath derbytools.jar:derby.jar:derbyclient.jar 
org.apache.derby.tools.ij

Depending on whether you are going to use the embedded or the client 
driver, derby.jar or derbyclient.jar can be excluded from the classpath.
If you run one of the 'set*CP.bat' scripts, you should be able to omit 
the classpath argument.

In my installation Derby / Java DB is included under 'glassfish/javadb', 
and the jars are placed under the subdirectory 'lib'.
There is no bin directory, and I don't know the reason for that.
Anyone else?



regards,
-- 
Kristian

> 
> Thanks,
> John