db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Watts <...@cliftonfarm.org>
Subject Re: AW: AW: schema-questions
Date Wed, 18 Jul 2012 15:47:45 GMT
Hi Malte,

On Wed, 2012-07-18 at 13:44 +0200, Malte.Kempff@de.equens.com wrote:
> Hi Tim
> My JAVA_OPS look like that, when I use set command:
> JAVA_OPTS=-Dderby.system.home=c:\derby-dbs

That looks reasonable.

> 
> I suppose that the JAVA_OPTS are recognized by derby in my particular
> case. Otherweise I would not understand why derby produces and writes
> and reads from the given directory.
> It is a bit of unexplainable to me, since today it works with
> following ij call
> java %JAVA_OPTS% -Dij.protocol=jebc:derby: -jar %DERBY_HOME
> %/lib/derbyrun.jar ij
> ij> connect
> 'jdbc:derby://localhost:1527/testdb;create=true;user=tralla;password=duddeldi';
> Here I get the expected error now:
> FEHLER 08004: Die Verbindung konnte nicht authentifiziert werden.
> Ursache: Die Benutzer-ID oder das Kennwort ist ung³ltig.
> 
> 
> Yesterday it did not work neither via ij nor within tomcat. Always it
> did not matter whether the right password or user was set or not.

It would be very difficult to figure out exactly what actually happened
between yesterday and today from a few sketchy details.  It probably
doesn't matter much at this point.

> 
> Using tomcat I still get that ignoring of derby.properties, 

Did you try invoking test.jsp from my last post?  That would tell you if
the running instance of Tomcat had a JAVA_OPTS and derby.system.home
passed through to it.

> at least the password I am using seems not to matter at all
> Here my entry in context.xml for tomcat similar to the recommanded one
> I found in http://www.zetcode.com/db/apachederbytutorial/tomcat/
> <?xml version="1.0" encoding="UTF-8"?>
> <Context>
>     <Resource name="jdbc/testdb" 
>               auth="Container"
>               type="javax.sql.DataSource" 
>               username="tech"
>               password="schnaddel"
>               driverClassName="org.apache.derby.jdbc.ClientDriver"
>               url="jdbc:derby://localhost:1527/testdb"
>               maxActive="10" 
>               maxIdle="4"/>
> 
> </Context>
> 
> The right password is supposed to be something else , but it works :-D
> (?!)
> 
> By the way (sorry for asking such a question of beginners :-)):
> Using the web-app of derby (Derby Network Server) there is the option
> to change max amount of threads and thread time slices.
> What does that mean exactly? Could that interfere with the definition
> of DataSource within context.xml, or is that something totally
> different?

See http://db.apache.org/derby/docs/10.8/adminguide/tadminconfiguringthenetworkserver.html

> 
> 
Lastly, let me point out that there is absolutely NO requirement to run
the Derby war in order to use Derby from a web application.  You could
just as easily run the Derby Network Server in a separate process or use
an embedded Derby engine.  Just wanted to point that out so you and
others aware of the possibilities.

> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Tim Watts [mailto:tim@cliftonfarm.org] 
> Gesendet: Dienstag, 17. Juli 2012 22:36
> An: Derby Discussion
> Betreff: Re: AW: schema-questions
> 
> On Tue, 2012-07-17 at 18:13 +0200, Malte.Kempff@de.equens.com wrote:
> > I start tomcat (version 6) with ist startup batch file only
> > 
> OK.  What displays when you type  echo %JAVA_OPTS%  at the command
> prompt?
> 
> To verify whether it's being passed through to Tomcat try saving the
> following to webapps/ROOT/test.jsp then pointing your browser to
> http://localhost:8080/test.jsp .
> 
> test.jsp:
> ---------
> <html>
> <body>
> derby.system.home=<%= System.getProperty("derby.system.home") %><br>
> JAVA_OPTS=<%= System.getenv("JAVA_OPTS") %><br> </body> </html>
> 
> I have verified on my system that derby.properties is recognized when
> setting derby.system.home via JAVA_OPTS. (Derby 10.8.1.2)
> 
> 
> > -----Ursprüngliche Nachricht-----
> > Von: Tim Watts [mailto:tim@cliftonfarm.org]
> > Gesendet: Dienstag, 17. Juli 2012 18:08
> > An: Derby Discussion
> > Betreff: Re: schema-questions
> > 
> > On Tue, 2012-07-17 at 16:44 +0200, Malte.Kempff@de.equens.com wrote:
> > > Another thing I am wondreing is, that it seems not to matter using a 
> > > user or not using following derby.properties, though:
> > > derby.stream.error.logSeverityLevel=0
> > > derby.database.fullAccessUsers=tech
> > > derby.database.defaultConnectionMode=readOnlyAccess
> > > derby.connection.requireAuthentication=true
> > > derby.user.tech=lala_dongs
> > > derby.user.rou=gaga_bings
> > >  
> > > derby.authentication.provider=builtin
> > >  
> > >  
> > > derby seems not to use my derby.proerties. I have put them to the 
> > > directory, which is given in the derby.system.home 
> > > Java-system-property.
> > > It is told to put this system-property into the environment variable 
> > > JAVA_OPTS, so tomcat would use it for starting up.
> > > I am using  Windows-XP so I defined ths environment-variable in the 
> > > dialog as user defined variable.
> > > What am I missing, since derby.properties seem not to work may be 
> > > not even been read.
> > >  
> > Are you running Tomcat as a service?  If so then see this:
> > 
> >         
> > http://tomcat.apache.org/tomcat-7.0-doc/windows-service-howto.html
> > 
> > (adjust according to the tomcat version you're using).
> > 
> > > Thanks for hints in advance
> > >  
> > > Malte
> > > 
> > 
> 


Mime
View raw message