[jboss-jira] [JBoss JIRA] (JBJCA-1265) Cannot deploy "datasource.xml" file into embedded IronJacamar container

Nickolay Laptev (JIRA) issues at jboss.org
Tue May 5 08:09:46 EDT 2015


Nickolay Laptev created JBJCA-1265:
--------------------------------------

             Summary: Cannot deploy "datasource.xml" file into embedded IronJacamar container
                 Key: JBJCA-1265
                 URL: https://issues.jboss.org/browse/JBJCA-1265
             Project: IronJacamar
          Issue Type: Bug
          Components: Embedded
    Affects Versions: 1.1.0.Beta5
         Environment: MacOS X
            Reporter: Nickolay Laptev
            Assignee: Jesper Pedersen


I cannot deploy file with name "datasource.xml" into embedded container.
Got the following in stack trace while loading JNDI component:
Caused by: javax.naming.NameNotFoundException: PostgresDS not bound
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
        at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
        at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
        at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
        at javax.naming.InitialContext.lookup(InitialContext.java:417)
        at org.springframework.jndi.JndiTemplate$1.doInContext(JndiTemplate.java:155)
        at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:87)
        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:152)
        at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:179)
        at org.springframework.jndi.JndiLocatorSupport.lookup(JndiLocatorSupport.java:95)
        at org.springframework.jndi.JndiObjectLocator.lookup(JndiObjectLocator.java:106)
        at org.springframework.jndi.JndiObjectFactoryBean.lookupWithFallback(JndiObjectFactoryBean.java:231)
        at org.springframework.jndi.JndiObjectFactoryBean.afterPropertiesSet(JndiObjectFactoryBean.java:217)

The fun this is that it's actual just for name "datasource.xml". If I change it to some other name the file will be deployed without any problems.

Seems "datasource.xml" is hardcoded in some way in embedded container.

Sample code:
System.setProperty("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
        System.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
Embedded container; // initialized with Spring <bean id="container" class="org.jboss.jca.embedded.EmbeddedFactory" factory-method="create"/>
container.startup();
container.deploy("jdbc-xa.rar");
container.deploy("datasource.xml");



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list