You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@roller.apache.org by Dave <sn...@gmail.com> on 2008/02/11 22:42:22 UTC

Oracle connection URL issue? (was Re: Error filterStart?)

On Feb 11, 2008 1:58 PM, Timothy Mizas <ti...@villanova.edu> wrote:
> In roller.log I get RollerContext:upgradeDatabaseIfNeeded -
> org.apache.commons.dbcp.SQLNestedException:
> Cannot create JDBC driver of class '' for connect URL 'null'

That Tomcat error message basically means that there is something
wrong with your database configuration, i.e. the JDBC jar is in the
wrong place, the connection URL is wrong, the driver class name is
wrong, etc.


> I'm connecting to Oracle9i and my classes12.jar is in common/lib. My roller-custom.properties file is found and loaded. I have a roller.xml file in conf/Standalone/hostname/ which is where my tomcat looks for contexts, that looks like

That all sounds good.


> <Context path="/roller"
>   docBase="/path-to/roller" debug="0">
>
>         <Resource auth="Container"
>          connectionProperties="autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;mysqlEncoding=utf8"
>          driverClassName="oracle.jdbc.driver.OracleDriver"
>          maxActive="50"
>          maxIdle="3"
>          maxWait="3000"
>          name="jdbc/rollerdb"
>          password="passwrd"
>          removeAbandoned="true"
>          type="javax.sql.DataSource"
>          url="jdbc:oracle:thin:@dburl"
>          username="username"/>
> </Context>

I don't think I've ever seen the connectionProperties attribute
before. And it looks like you are putting the MySQL connection
properties in there, that can't be right.

Any Oracle users out there want to offer some connection URL advice to
Mr. Mizas?

- Dave

Re: Trying to start Roller without mail

Posted by Dave <sn...@gmail.com>.
On Feb 12, 2008 10:29 AM, Broderick, Andrew
<An...@monster.com> wrote:
> The jars were in roller/WEB-INF/lib. Moving them to Tomcat's lib
> directory cleared up the problem. Why do they have to be in Tomcat's lib
> directory though, as opposed to the application's?

Because Tomcat is the one creating, managing and handing out the mail
connections.

- Dave

Re: Couldn't lookup current database version - maybe related to user registration error

Posted by Simon Haslam <si...@yahoo.co.uk>.
--- Gabe Wong <ga...@ngasi.com> wrote:
> Add the following line to it:
> hibernate.dialect=org.hibernate.dialect.OracleDialect
> 
> Hi Dave,
> Is there an error in the Install Guide:
> # If you are using the Hibernate backend (deprecated as of Roller 4.0),
> # you MUST override this to use a database other than MySQL4
> hibernate.dialect=org.hibernate.dialect.MySQLDialect
> 

I've also got this in my roller-custom.properties too (as I think Gabe suggested):
openjpa.jdbc.DBDictionary=oracle

-Simon


      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com


Re: Couldn't lookup current database version - maybe related to user registration error

Posted by Gabe Wong <ga...@ngasi.com>.
Broderick, Andrew wrote:
> Here it is:
>
> installation.type=auto
> database.configurationType=jdbc
> database.jdbc.driverClass=oracle.jdbc.OracleDriver
> database.jdbc.connectionURL=jdbc:oracle:thin:@localhost:1521:xe
> database.jdbc.username=*****
> database.jdbc.password=*****
>
> Thanks
>
> -----Original Message-----
> From: Gabe Wong [mailto:gabrielw@ngasi.com] 
> Sent: Tuesday, February 12, 2008 11:40 AM
> To: user@roller.apache.org
> Subject: Re: Couldn't lookup current database version - maybe related to
> user registration error
>
> Broderick, Andrew wrote:
>   
>> Sorry for all the messages, but I am getting another error that is
>> probably causing, or related to, the user registration one:
>>
>> ERROR 2008-02-12 11:11:51,440 DatabaseInstaller:getDatabaseVersion -
>> Couldn't lookup current database version
>>     
Add the following line to it:
hibernate.dialect=org.hibernate.dialect.OracleDialect

Hi Dave,
Is there an error in the Install Guide:
# If you are using the Hibernate backend (deprecated as of Roller 4.0),
# you MUST override this to use a database other than MySQL4
hibernate.dialect=org.hibernate.dialect.MySQLDialect

-- 
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
<a href=http://www.ngasi.com>http://www.ngasi.com</a>
NEW! 8.0 - Centrally manage multiple physical servers


RE: Couldn't lookup current database version - maybe related to user registration error

Posted by "Broderick, Andrew" <An...@Monster.com>.
Here it is:

installation.type=auto
database.configurationType=jdbc
database.jdbc.driverClass=oracle.jdbc.OracleDriver
database.jdbc.connectionURL=jdbc:oracle:thin:@localhost:1521:xe
database.jdbc.username=*****
database.jdbc.password=*****

Thanks

-----Original Message-----
From: Gabe Wong [mailto:gabrielw@ngasi.com] 
Sent: Tuesday, February 12, 2008 11:40 AM
To: user@roller.apache.org
Subject: Re: Couldn't lookup current database version - maybe related to
user registration error

Broderick, Andrew wrote:
> Sorry for all the messages, but I am getting another error that is
> probably causing, or related to, the user registration one:
>
> ERROR 2008-02-12 11:11:51,440 DatabaseInstaller:getDatabaseVersion -
> Couldn't lookup current database version
> java.lang.NumberFormatException: null
> 	at java.lang.Integer.parseInt(Integer.java:415)
>   
Could you share your roller-custom.properties file with us?

-- 
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
<a href=http://www.ngasi.com>http://www.ngasi.com</a>
NEW! 8.0 - Centrally manage multiple physical servers



NOTICE:
This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. (FE1)

Re: Couldn't lookup current database version - maybe related to user registration error

Posted by Gabe Wong <ga...@ngasi.com>.
Broderick, Andrew wrote:
> Sorry for all the messages, but I am getting another error that is
> probably causing, or related to, the user registration one:
>
> ERROR 2008-02-12 11:11:51,440 DatabaseInstaller:getDatabaseVersion -
> Couldn't lookup current database version
> java.lang.NumberFormatException: null
> 	at java.lang.Integer.parseInt(Integer.java:415)
>   
Could you share your roller-custom.properties file with us?

-- 
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
<a href=http://www.ngasi.com>http://www.ngasi.com</a>
NEW! 8.0 - Centrally manage multiple physical servers


Couldn't lookup current database version - maybe related to user registration error

Posted by "Broderick, Andrew" <An...@monster.com>.
Sorry for all the messages, but I am getting another error that is
probably causing, or related to, the user registration one:

ERROR 2008-02-12 11:11:51,440 DatabaseInstaller:getDatabaseVersion -
Couldn't lookup current database version
java.lang.NumberFormatException: null
	at java.lang.Integer.parseInt(Integer.java:415)
	at java.lang.Integer.parseInt(Integer.java:497)
	at
org.apache.roller.weblogger.business.startup.DatabaseInstaller.getDataba
seVersion(DatabaseInstaller.java:1169)
	at
org.apache.roller.weblogger.business.startup.DatabaseInstaller.isUpgrade
Required(DatabaseInstaller.java:99)
	at
org.apache.roller.weblogger.business.startup.WebloggerStartup.prepare(We
bloggerStartup.java:201)

As I mentioned, my DB is Oracle 10g XE. It can connect, and managed to
run the create table scripts. All the tables appear to be there, and I
am not getting a connection error. Any ideas?

Thanks


NOTICE:
This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. (FE1)

Re: The administrator of this site has disabled user registrations at this time ...

Posted by Dave <sn...@gmail.com>.
On Tue, Feb 12, 2008 at 11:50 AM, Broderick, Andrew
<An...@monster.com> wrote:
> As a followup to my previous message, I found the
>  'users.registration.enabled' property, which was initially set to false!
>  I set it to true in the DB, and restarted Tomcat, but it made no
>  difference. Still cannot register a user.

Hmm. That should do it.

Can you see that property in the UI (on the Server Admin page)? Does
it appear to be enabled in the UI?

- Dave

RE: The administrator of this site has disabled user registrations at this time ...

Posted by "Broderick, Andrew" <An...@Monster.com>.
As a followup to my previous message, I found the
'users.registration.enabled' property, which was initially set to false!
I set it to true in the DB, and restarted Tomcat, but it made no
difference. Still cannot register a user.

Thanks


NOTICE:
This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. (FE1)

The administrator of this site has disabled user registrations at this time ...

Posted by "Broderick, Andrew" <An...@Monster.com>.
Hi,

Now I have my new Tomcat installation of Roller 4 working, and have
created the database tables (Oracle 10 XE). Clicking the new user
registration link, however, gives me the following message:

The administrator of this site has disabled user registrations at this
time. Please contact the system administrators if you think this is
incorrect.

It has created the roller_data directory, so that's not the problem. I
can't find anything in the log files either. What could be the problem?

Thanks



NOTICE:
This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. (FE1)

Re: Trying to start Roller without mail

Posted by Gabe Wong <ga...@ngasi.com>.
Broderick, Andrew wrote:
> The jars were in roller/WEB-INF/lib. Moving them to Tomcat's lib
> directory cleared up the problem. Why do they have to be in Tomcat's lib
> directory though, as opposed to the application's?
>
> -Andrew
>   
Refer to the following URL (specifically the JavaMail section):
http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html

Essentially it is related to the classloading hierarchy of the container.



-- 
Regards

Gabe Wong
NGASI AppServer Manager
JAVA AUTOMATION and SaaS Enablement
<a href=http://www.ngasi.com>http://www.ngasi.com</a>
NEW! 8.0 - Centrally manage multiple physical servers


RE: Trying to start Roller without mail

Posted by "Broderick, Andrew" <An...@Monster.com>.
The jars were in roller/WEB-INF/lib. Moving them to Tomcat's lib
directory cleared up the problem. Why do they have to be in Tomcat's lib
directory though, as opposed to the application's?

-Andrew

-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Monday, February 11, 2008 6:25 PM
To: user@roller.apache.org
Subject: Re: Trying to start Roller without mail

On Feb 11, 2008 6:28 PM, Broderick, Andrew
<An...@monster.com> wrote:
> I want to run Roller without using e-mail at all. I have put all the
> JavaMail jars in the lib directory anyway though, but removed all mail
> config lines from the roller-custom.properties.

Yes, you need those jars -- even if you do not want to use mail.


> On starting Tomcat (v6), I get this error:
>
> INFO: Loading Spring root WebApplicationContext
> Feb 11, 2008 5:24:37 PM org.apache.catalina.core.StandardContext
> listenerStart
> SEVERE: Exception sending context initialized event to listener
instance
> of class org.apache.roller.weblogger.ui.core.RollerContext
> java.lang.NoClassDefFoundError: javax/mail/Authenticator
>         at
>
org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessi
> onFactory.java:105)
>         at
>
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFact
> ory.java:140)
>         at
>
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
>         at
> org.apache.naming.NamingContext.lookup(NamingContext.java:793)
>         at
> org.apache.naming.NamingContext.lookup(NamingContext.java:140)
>
> mail.jar, which contains this class, is definitely in the classpath.
Any
> ideas what could be causing this?

That error message means that the mail.jar is definitely NOT in the
classpath.

Make sure you put both mail.jar and activation.jar in the Tomcat lib
directory.

- Dave


NOTICE:
This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. (FE1)

Re: Trying to start Roller without mail

Posted by Dave <sn...@gmail.com>.
On Feb 11, 2008 6:28 PM, Broderick, Andrew <An...@monster.com> wrote:
> I want to run Roller without using e-mail at all. I have put all the
> JavaMail jars in the lib directory anyway though, but removed all mail
> config lines from the roller-custom.properties.

Yes, you need those jars -- even if you do not want to use mail.


> On starting Tomcat (v6), I get this error:
>
> INFO: Loading Spring root WebApplicationContext
> Feb 11, 2008 5:24:37 PM org.apache.catalina.core.StandardContext
> listenerStart
> SEVERE: Exception sending context initialized event to listener instance
> of class org.apache.roller.weblogger.ui.core.RollerContext
> java.lang.NoClassDefFoundError: javax/mail/Authenticator
>         at
> org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessi
> onFactory.java:105)
>         at
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFact
> ory.java:140)
>         at
> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
>         at
> org.apache.naming.NamingContext.lookup(NamingContext.java:793)
>         at
> org.apache.naming.NamingContext.lookup(NamingContext.java:140)
>
> mail.jar, which contains this class, is definitely in the classpath. Any
> ideas what could be causing this?

That error message means that the mail.jar is definitely NOT in the classpath.

Make sure you put both mail.jar and activation.jar in the Tomcat lib directory.

- Dave

Trying to start Roller without mail

Posted by "Broderick, Andrew" <An...@Monster.com>.
Hi,

I want to run Roller without using e-mail at all. I have put all the
JavaMail jars in the lib directory anyway though, but removed all mail
config lines from the roller-custom.properties. 

On starting Tomcat (v6), I get this error:

INFO: Loading Spring root WebApplicationContext
Feb 11, 2008 5:24:37 PM org.apache.catalina.core.StandardContext
listenerStart
SEVERE: Exception sending context initialized event to listener instance
of class org.apache.roller.weblogger.ui.core.RollerContext
java.lang.NoClassDefFoundError: javax/mail/Authenticator
	at
org.apache.naming.factory.MailSessionFactory.getObjectInstance(MailSessi
onFactory.java:105)
	at
org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFact
ory.java:140)
	at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
	at
org.apache.naming.NamingContext.lookup(NamingContext.java:793)
	at
org.apache.naming.NamingContext.lookup(NamingContext.java:140)

mail.jar, which contains this class, is definitely in the classpath. Any
ideas what could be causing this?

Thanks


NOTICE:
This message may contain privileged or otherwise confidential information. If you are not the intended recipient, please immediately advise the sender by reply email and delete the message and any attachments without using, copying or disclosing the contents. (FE1)

RE: Oracle connection URL issue? (was Re: Error filterStart?)

Posted by Boris Milikič <bo...@mf-rs.si>.
<Context path="/roller" docBase="C:\projects\roller">
  <Resource
    auth="Container"
    name="jdbc/rollerdb"
    type="javax.sql.DataSource"
    driverClassName="oracle.jdbc.driver.OracleDriver"
          factory="org.apache.commons.dbcp.BasicDataSourceFactory"
    username="bm"
    password="bm"
    url="jdbc:oracle:thin:@irisint.com:1521:ROMA"
    maxActive="20" maxIdle="3" removeAbandoned="true" maxWait="3000" />
  <Resource
    auth="Container"
    name="mail/Session"
    type="javax.mail.Session"
            mail.smtp.host="smtp.mf.si" 
            mail.smtp.auth="true"
            mail.smtp.user="bm"
            mail.smtp.password="bm"
            mail.mime.charset="UTF-8"/>
</Context>

- Boris
 

-----Original Message-----
From: Dave [mailto:snoopdave@gmail.com] 
Sent: Monday, February 11, 2008 10:42 PM
To: user@roller.apache.org
Subject: Oracle connection URL issue? (was Re: Error filterStart?)

On Feb 11, 2008 1:58 PM, Timothy Mizas <ti...@villanova.edu> wrote:
> In roller.log I get RollerContext:upgradeDatabaseIfNeeded -
> org.apache.commons.dbcp.SQLNestedException:
> Cannot create JDBC driver of class '' for connect URL 'null'

That Tomcat error message basically means that there is something wrong with your database configuration, i.e. the JDBC jar is in the wrong place, the connection URL is wrong, the driver class name is wrong, etc.


> I'm connecting to Oracle9i and my classes12.jar is in common/lib. My 
> roller-custom.properties file is found and loaded. I have a roller.xml 
> file in conf/Standalone/hostname/ which is where my tomcat looks for 
> contexts, that looks like

That all sounds good.


> <Context path="/roller"
>   docBase="/path-to/roller" debug="0">
>
>         <Resource auth="Container"
>          connectionProperties="autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=utf-8&amp;mysqlEncoding=utf8"
>          driverClassName="oracle.jdbc.driver.OracleDriver"
>          maxActive="50"
>          maxIdle="3"
>          maxWait="3000"
>          name="jdbc/rollerdb"
>          password="passwrd"
>          removeAbandoned="true"
>          type="javax.sql.DataSource"
>          url="jdbc:oracle:thin:@dburl"
>          username="username"/>
> </Context>

I don't think I've ever seen the connectionProperties attribute before. And it looks like you are putting the MySQL connection properties in there, that can't be right.

Any Oracle users out there want to offer some connection URL advice to Mr. Mizas?

- Dave