Announcement Announcement Module
Collapse
No announcement yet.
problem with accessing properties file. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Exactly same result:

    C:\Development\TREMS\dist>java -cp .;lib/activation.jar;lib/commons-dbcp-1.2.2.j
    ar;lib/commons-pool-1.3.jar;lib/derby.jar;lib/derbyclient.jar;lib/derbyLocale_de
    _DE.jar;lib/derbyLocale_es.jar;lib/derbyLocale_fr.jar;lib/derbyLocale_it.jar;lib
    /derbyLocale_ja_JP.jar;lib/derbyLocale_ko_KR.jar;lib/derbyLocale_pt_BR.jar;lib/d
    erbyLocale_zh_CN.jar;lib/derbyLocale_zh_TW.jar;lib/derbynet.jar;lib/derbyTesting
    .jar;lib/derbytools.jar;lib/ibatis-common-2.jar;lib/ibatis-dao-2.jar;lib/ibatis-
    sqlmap-2.jar;lib/mysql-connector-java-5.0.6-bin.jar;lib/spring-aop.jar;lib/sprin
    g-beans.jar;lib/spring-context.jar;lib/spring-core.jar;lib/spring-dao.jar;lib/sp
    ring-hibernate.jar;lib/spring-jdbc.jar;lib/spring-mock.jar;lib/spring-orm.jar;li
    b/spring-remoting.jar;lib/spring-support.jar;lib/spring-web.jar;lib/spring-webmv
    c.jar;lib/spring.jar;lib/commons-logging-1.1.jar;lib/commons-logging-adapters-1.
    1.jar;lib/commons-logging-api-1.1.jar;lib/commons-collections-3.2.jar; -jar TREM
    S.jar
    22-Aug-2007 10:42:34 org.springframework.core.CollectionFactory <clinit>
    INFO: JDK 1.4+ collections available
    22-Aug-2007 10:42:34 org.springframework.core.CollectionFactory <clinit>
    INFO: Commons Collections 3.x available
    22-Aug-2007 10:42:34 org.springframework.beans.factory.xml.XmlBeanDefin itionRead
    er loadBeanDefinitions
    INFO: Loading XML bean definitions from class path resource [applicationContext.
    xml]
    22-Aug-2007 10:42:34 org.springframework.context.support.AbstractRefres hableAppl
    icationContext refreshBeanFactory
    INFO: Bean factory for application context [org.springframework.context.support.
    FileSystemXmlApplicationContext;hashCode=14651377]: org.springframework.beans.fa
    ctory.support.DefaultListableBeanFactory defining beans [propertyConfigurer,base
    TransactionProxy,dataSource,transactionManager,rms Test,sqlMapClient,appUserDao];
    root of BeanFactory hierarchy
    22-Aug-2007 10:42:34 org.springframework.context.support.AbstractApplic ationCont
    ext refresh
    INFO: 7 beans defined in application context [org.springframework.context.suppor
    t.FileSystemXmlApplicationContext;hashCode=1465137 7]
    22-Aug-2007 10:42:34 org.springframework.core.io.support.PropertiesLoad erSupport
    loadProperties
    INFO: Loading properties file from class path resource [dbconnection.properties]

    22-Aug-2007 10:42:34 org.springframework.context.support.AbstractApplic ationCont
    ext initMessageSource
    INFO: Unable to locate MessageSource with name 'messageSource': using default [o
    rg.springframework.context.support.DelegatingMessa geSource@2a6f16]
    22-Aug-2007 10:42:34 org.springframework.context.support.AbstractApplic ationCont
    ext initApplicationEventMulticaster
    INFO: Unable to locate ApplicationEventMulticaster with name 'applicationEventMu
    lticaster': using default [org.springframework.context.event.SimpleApplicatio nEv
    entMulticaster@1807ca8]
    22-Aug-2007 10:42:34 org.springframework.beans.factory.support.DefaultL istableBe
    anFactory preInstantiateSingletons
    INFO: Pre-instantiating singletons in factory [org.springframework.beans.factory
    .support.DefaultListableBeanFactory defining beans [propertyConfigurer,baseTrans
    actionProxy,dataSource,transactionManager,rmsTest, sqlMapClient,appUserDao]; root
    of BeanFactory hierarchy]
    22-Aug-2007 10:42:34 org.springframework.aop.framework.DefaultAopProxyF actory <c
    linit>
    INFO: CGLIB2 not available: proxyTargetClass feature disabled
    22-Aug-2007 10:42:34 org.springframework.jdbc.datasource.JdbcTransactio nObjectSu
    pport <clinit>
    INFO: JDBC 3.0 Savepoint class is available
    Exception in thread "main" org.springframework.transaction.CannotCreateTransa cti
    onException: Could not open JDBC Connection for transaction; nested exception is
    org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class '"org
    .apache.derby.jdbc.EmbeddedDriver"'
    org.apache.commons.dbcp.SQLNestedException: Cannot load JDBC driver class '"org.
    apache.derby.jdbc.EmbeddedDriver"'
    at org.apache.commons.dbcp.BasicDataSource.createData Source(BasicDataSou
    rce.java:1136)
    at org.apache.commons.dbcp.BasicDataSource.getConnect ion(BasicDataSource
    .java:880)
    at org.springframework.jdbc.datasource.DataSourceTran sactionManager.doBe
    gin(DataSourceTransactionManager.java:182)
    at org.springframework.transaction.support.AbstractPl atformTransactionMa
    nager.getTransaction(AbstractPlatformTransactionMa nager.java:283)
    at org.springframework.transaction.interceptor.Transa ctionAspectSupport.
    createTransactionIfNecessary(TransactionAspectSupp ort.java:226)
    at org.springframework.transaction.interceptor.Transa ctionInterceptor.in
    voke(TransactionInterceptor.java:89)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(
    ReflectiveMethodInvocation.java:170)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynami
    cAopProxy.java:176)
    at $Proxy0.selectByPrimaryKey(Unknown Source)
    at Launcher.StartApplication.<init>(StartApplication. java:76)
    at Launcher.StartApplication.main(StartApplication.ja va:81)
    Caused by: java.lang.ClassNotFoundException: "org.apache.derby.jdbc.EmbeddedDriv
    er"
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:268)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 51)
    at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:319)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at org.apache.commons.dbcp.BasicDataSource.createData Source(BasicDataSou
    rce.java:1130)
    ... 10 more

    C:\Development\TREMS\dist>pause

    Comment


    • #17
      What is the code for the Launcher class?

      I wonder if it could be a ClassLoading issue, or maybe the fact that the jars cannot be found...

      Comment


      • #18
        Code:
        main ()
        {
        
        ApplicationContext context = new FileSystemXmlApplicationContext("classpath:applicationContext.xml");
                    RmsDaoFacade aUser = (RmsDaoFacade)context.getBean("rmsTest");
        }
        thanks

        Comment


        • #19
          I think I have it.

          Your properties file is wrong...

          Code:
          jdbc.driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
          It includes " in all the properties contained in there. Remove the " from the properties.

          Code:
          jdbc.driverClassName=org.apache.derby.jdbc.EmbeddedDriver

          Comment


          • #20
            Thanks for your patience and support. Will not make same mistake again

            Comment


            • #21
              Took a while but we are finally there. Glad that it worked out.

              Comment

              Working...
              X