You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Carsten Ziegeler <cz...@s-und-n.de> on 2002/06/12 16:48:40 UTC

What are the problems with JDK 1.4?

Hi,

for the next release (2.0.3) we should try to fix the problems concerning
JDK 1.4. One problem, the building of the javadocs is solved now.

But it seems that there are problems with JDBC Pooling. If I compile
everything using JDK 1.4, the sql examples run well. Running this with JDK
1.4, the hsqldb is throwing an exception:

java.sql.SQLException: Connection is broken: Connection refused: connect
        at org.hsqldb.Trace.getError(Trace.java:180)
        at org.hsqldb.Trace.getError(Trace.java:144)
        at org.hsqldb.Trace.error(Trace.java:205)
        at org.hsqldb.jdbcConnection.reconnectHSQL(jdbcConnection.java:865)
        at org.hsqldb.jdbcConnection.openHSQL(jdbcConnection.java:833)
        at org.hsqldb.jdbcConnection.<init>(jdbcConnection.java:678)
        at org.hsqldb.jdbcDriver.connect(jdbcDriver.java:116)
        at java.sql.DriverManager.getConnection(DriverManager.java:512)
        at java.sql.DriverManager.getConnection(DriverManager.java:171)
        at
org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.<init>(J
dbcConnectionFactory.java:98)

Is this a problem with hsqldb? Are other dbs working?

Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: What are the problems with JDK 1.4?

Posted by Sam <sa...@atnet.net.au>.
Hi,
    I've been playing with Cocoon 2 for a while now in my spare time, it's
quite a piece of work, guys! Anyhow, even using the latest source from CVS
with JDK1.3 the JDBC Pooling seems to have some strange behaviour when more
than 1 datasource is involved.

If I add another jdbc datasource to the cocoon.xconf file, (in my example
I added a mysql database, using the latest mm Mysql driver) cocoon seems to be
confused about which database to use when i go to the forms/employee database
example. If I remove the new datasource, it works fine. The same problem
exists on a page that I write that uses the new datasource - for now my
workaround was simply to do away with HSQLdb, but I thought I might mention it
- I would have thought multiple sources ought to be possible.

--- snippet from cocoon.xconf ---
  <datasources>
    <jdbc name="gorb">
      <pool-controller max="10" min="5"/>
      <dburl>jdbc:mysql://192.168.0.111/gorb</dburl>
      <user>gorb</user>
      <password>f1kus</password>
    </jdbc>
    <jdbc logger="core.datasources.personnel" name="personnel">
      <pool-controller max="10" min="5"/>
      <dburl>jdbc:hsqldb:hsql://localhost:9002</dburl>
      <user>sa</user>
      <password/>
    </jdbc>
  </datasources>

-- console errors from tomcat (4.0.1) when navigating to forms/employee sample
URL --
DriverManager.getConnection("jdbc:mysql://192.168.0.111/gorb")
    trying
driver[className=org.gjt.mm.mysql.Driver,org.gjt.mm.mysql.Driver@2bc3f5]
getConnection returning
driver[className=org.gjt.mm.mysql.Driver,org.gjt.mm.mysql.Driver@2bc3f5]
DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:9002")
    trying
driver[className=org.gjt.mm.mysql.Driver,org.gjt.mm.mysql.Driver@2bc3f5]
getConnection: no suitable driver
java.sql.SQLException: No suitable driver
 at java.sql.DriverManager.getConnection(DriverManager.java:537)
 at java.sql.DriverManager.getConnection(DriverManager.java:177)
 at
org.apache.avalon.excalibur.datasource.JdbcConnectionFactory.<init>(JdbcConnectionFactory.java:98)

 at
org.apache.avalon.excalibur.datasource.ResourceLimitingJdbcDataSource.configure(ResourceLimitingJdbcDataSource.java:292)

 at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:191)

 at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:104)

 at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.addComponent(ExcaliburComponentSelector.java:507)

 at
org.apache.avalon.excalibur.component.ExcaliburComponentSelector.configure(ExcaliburComponentSelector.java:336)

 at
org.apache.avalon.excalibur.component.DefaultComponentFactory.newInstance(DefaultComponentFactory.java:191)

 at
org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:104)

 at
org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:157)

 at org.apache.cocoon.Cocoon.initialize(Cocoon.java:274)
 at
org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1221)
 at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:422)
 at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:852)
 at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3267)

 at org.apache.catalina.core.StandardContext.start(StandardContext.java:3384)
 at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:785)
 at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:454) at
org.apache.catalina.core.StandardHost.install(StandardHost.java:712)
 at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:647)
 at org.apache.catalina.startup.HostConfig.start(HostConfig.java:777)
 at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:463)

 at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)

 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1131) at
org.apache.catalina.core.StandardHost.start(StandardHost.java:612)
 at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1123) at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:307)
 at org.apache.catalina.core.StandardService.start(StandardService.java:388)
 at org.apache.catalina.core.StandardServer.start(StandardServer.java:505)
 at org.apache.catalina.startup.Catalina.start(Catalina.java:776)
 at org.apache.catalina.startup.Catalina.execute(Catalina.java:681)
 at org.apache.catalina.startup.Catalina.process(Catalina.java:179)
 at java.lang.reflect.Method.invoke(Native Method)
 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:243)
SQLException: SQLState(08001)

>

--
Sam Coward, Systems Engineer, Golden Orb Technologies
http://www.golden-orb.com


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org