jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Narender (JIRA)" <j...@apache.org>
Subject [jira] Created: (JCR-1899) Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager: Access denied for user 'root'@'localhost' (using password: NO): Access denied for user 'root'@'localhost' (using password: NO)
Date Fri, 05 Dec 2008 04:06:44 GMT
Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager:
Access denied for user 'root'@'localhost' (using password: NO): Access denied for user 'root'@'localhost'
(using password: NO)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

                 Key: JCR-1899
                 URL: https://issues.apache.org/jira/browse/JCR-1899
             Project: Jackrabbit
          Issue Type: Bug
            Reporter: Narender


 pls help me

am integrate jackrabbit+spring
while reading the repository.xml file am getting error .

Context file


<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans 
       http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
       http://www.springframework.org/schema/util 
       http://www.springframework.org/schema/util/spring-util-2.0.xsd">

  <bean id="repository" class="org.springmodules.jcr.jackrabbit.RepositoryFactoryBean">
    <property name="configuration" value="classpath:repository.xml"/>
    <property name="homeDir" value="file:/foo/repository"/>
  </bean>
 

  <bean id="jcrSessionFactory" class="org.springmodules.jcr.JcrSessionFactory">
    <property name="repository" ref="repository"/>
    <property name="credentials">
      <bean class="javax.jcr.SimpleCredentials">
        <constructor-arg index="0" value="user"/>
        <constructor-arg index="1">
          <bean factory-bean="password" factory-method="toCharArray"/>
        </constructor-arg>
      </bean>
    </property>
  </bean>
  
  <bean id="password" class="java.lang.String">
    <constructor-arg index="0" value="password"/>
  </bean>
  
  <bean id="jcrTemplate" class="org.springmodules.jcr.JcrTemplate">
    <property name="sessionFactory" ref="jcrSessionFactory"/>
    <property name="allowCreate" value="true"/>
  </bean>

     <bean id="barrepository" class="com.mycompany.myapp.barrepositoryImpl">
    <property name="repository" ref="repository"/>
    
  </bean>
</beans>  



Repository file


<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE Repository PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 1.2//EN"
"http://jackrabbit.apache.org/dtd/repository-1.2.dtd">
<Repository>

  <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
    <param name="path" value="${rep.home}/content"/>
  </FileSystem>

  <Security appName="Jackrabbit">
    <AccessManager class="org.apache.jackrabbit.core.security.SimpleAccessManager">
    </AccessManager>
    <LoginModule class="org.apache.jackrabbit.core.security.SimpleLoginModule">
      <param name="anonymous" value="anonymous"/>
    </LoginModule>
  </Security>

  <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/>
  
  <Workspace name="${wsp.name}">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${wsp.home}"/>
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
      <param name="driver" value="com.mysql.jdbc.Driver"/>
       <param name="url" value="jdbc:mysql://localhost:3306/spark"/>
      <param name="user" value="root"/>
      <param name="password" value="mysql"/>
      <param name="schemaObjectPrefix" value="con_"/>
    </PersistenceManager>
    <!-- dont want a SearchIndex, setup for Indexing -->
  </Workspace>

  <Versioning rootPath="${rep.home}/version">
    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
      <param name="path" value="${rep.home}/version"/>
    </FileSystem>
    <PersistenceManager class="org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager">
      <param name="driver" value="com.mysql.jdbc.Driver"/>
      <param name="url" value="jdbc:mysql://localhost:3306/spark"/>
      <param name="user" value="root"/>
      <param name="password" value="mysql"/>
      <param name="schemaObjectPrefix" value="ver_"/>
    </PersistenceManager>
  </Versioning>

  <!-- Dont want SearchIndex for searching -->
</Repository>


ERROR

Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'repository' defined in class path resource [appicationContext.xml]:
Invocation of init method failed; nested exception is javax.jcr.RepositoryException: Cannot
instantiate persistence manager org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager:
Access denied for user 'root'@'localhost' (using password: NO): Access denied for user 'root'@'localhost'
(using password: NO)
Caused by: javax.jcr.RepositoryException: Cannot instantiate persistence manager org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager:
Access denied for user 'root'@'localhost' (using password: NO): Access denied for user 'root'@'localhost'
(using password: NO)
	at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1121)
	at org.apache.jackrabbit.core.RepositoryImpl.access$600(RepositoryImpl.java:99)
	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1695)
	at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:540)
	at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:379)
	at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:286)
	at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:521)
	at org.springmodules.jcr.jackrabbit.RepositoryFactoryBean.createRepository(RepositoryFactoryBean.java:57)
	at org.springmodules.jcr.RepositoryFactoryBean.afterPropertiesSet(RepositoryFactoryBean.java:57)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1175)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
	at TestExample.main(TestExample.java:12)
Caused by: java.sql.SQLException: Access denied for user 'root'@'localhost' (using password:
NO)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
	at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:530)
	at org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager.init(MySqlPersistenceManager.java:54)
	at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1117)
	... 21 more
java.sql.SQLException: Access denied for user 'root'@'localhost' (using password: NO)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1055)
	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3491)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3423)
	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:910)
	at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:3923)
	at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1273)
	at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2031)
	at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:718)
	at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:46)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
	at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:302)
	at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:282)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at java.sql.DriverManager.getConnection(Unknown Source)
	at org.apache.jackrabbit.core.persistence.bundle.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:530)
	at org.apache.jackrabbit.core.persistence.bundle.MySqlPersistenceManager.init(MySqlPersistenceManager.java:54)
	at org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1117)
	at org.apache.jackrabbit.core.RepositoryImpl.access$600(RepositoryImpl.java:99)
	at org.apache.jackrabbit.core.RepositoryImpl$WorkspaceInfo.initialize(RepositoryImpl.java:1695)
	at org.apache.jackrabbit.core.RepositoryImpl.initWorkspace(RepositoryImpl.java:540)
	at org.apache.jackrabbit.core.RepositoryImpl.initStartupWorkspaces(RepositoryImpl.java:379)
	at org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:286)
	at org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:521)
	at org.springmodules.jcr.jackrabbit.RepositoryFactoryBean.createRepository(RepositoryFactoryBean.java:57)
	at org.springmodules.jcr.RepositoryFactoryBean.afterPropertiesSet(RepositoryFactoryBean.java:57)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1175)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1145)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:144)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:276)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:360)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:91)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:75)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:65)
	at TestExample.main(TestExample.java:12)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message