tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simon Renard <simon.ren...@3ds.com>
Subject tomee+ 1.5.1 : datasource creation failed with an empty UserName
Date Thu, 03 Jan 2013 14:08:20 GMT
Hello,

I've deployed a web application that uses a local derby database that does
not have any authentication necessary.

Since Tomee+ is defaulting the UserName to "sa" I registered the datasource
like shown bellow. 

This used to work in 1.5.0 but is now failing in 1.5.1. Please see stack
bellow. 

Am I missing something or is it a bug in 1.5.1 ? I've also tried to set
UserName to '' or "" but it results in '' and "" being the actual UserName.
Is their a bypass ?


Tomee.xml :

<Resource id="jdbc/gateway/GatewayDBXWS" type="DataSource">
  JdbcDriver org.apache.derby.jdbc.EmbeddedDriver
  JdbcUrl
jdbc:derby:C:/Users/ULV/Desktop/installation/XWS/persistance/GatewayDbDerby
  MaxActive 100
  MaxIdle 30
  MaxWait 10000
  UserName 
  Password 
  JtaManaged false
</Resource>

Stack in catalina.out :

INFO: Creating Resource(id=jdbc/gateway/GatewayDBXWS)
janv. 03, 2013 2:57:09 PM org.apache.openejb.util.OpenEJBErrorHandler
handleUnknownError
SEVERE: FATAL ERROR: Unknown error in Assembler.  Please send the following
stack trace and this message to users@openejb.apache.org :
 org.apache.xbean.recipe.ConstructionException: Error setting property:
public void
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(java.lang.String)
	at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:521)
	at
org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
	at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
	at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1733)
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:425)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:344)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
	at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:432)
	at java.util.Properties.setProperty(Properties.java:161)
	at
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(DataSourceProxy.java:416)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at
org.apache.xbean.recipe.ObjectRecipe$MethodMember.setValue(ObjectRecipe.java:641)
	at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:512)
	... 25 more

janv. 03, 2013 2:57:09 PM org.apache.openejb.OpenEJB$Instance <init>
SEVERE: OpenEJB has encountered a fatal error and cannot be started:
Assembler failed to build the container system.
org.apache.openejb.OpenEJBException:
org.apache.xbean.recipe.ConstructionException: Error setting property:
public void
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(java.lang.String):
Error setting property: public void
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(java.lang.String)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:357)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
	at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: org.apache.xbean.recipe.ConstructionException: Error setting
property: public void
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(java.lang.String)
	at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:521)
	at
org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
	at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
	at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1733)
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:425)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:344)
	... 17 more
Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:432)
	at java.util.Properties.setProperty(Properties.java:161)
	at
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(DataSourceProxy.java:416)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at
org.apache.xbean.recipe.ObjectRecipe$MethodMember.setValue(ObjectRecipe.java:641)
	at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:512)
	... 25 more

janv. 03, 2013 2:57:09 PM org.apache.tomee.catalina.ServerListener
lifecycleEvent
SEVERE: TomEE Listener can't start OpenEJB
org.apache.openejb.OpenEJBException:
org.apache.xbean.recipe.ConstructionException: Error setting property:
public void
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(java.lang.String):
Error setting property: public void
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(java.lang.String)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:357)
	at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java:144)
	at org.apache.openejb.OpenEJB.init(OpenEJB.java:290)
	at org.apache.tomee.catalina.TomcatLoader.initialize(TomcatLoader.java:233)
	at org.apache.tomee.catalina.TomcatLoader.init(TomcatLoader.java:130)
	at
org.apache.tomee.catalina.ServerListener.lifecycleEvent(ServerListener.java:121)
	at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
	at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:402)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:110)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:633)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:658)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:450)
Caused by: org.apache.xbean.recipe.ConstructionException: Error setting
property: public void
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(java.lang.String)
	at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:521)
	at
org.apache.xbean.recipe.ObjectRecipe.setProperties(ObjectRecipe.java:371)
	at
org.apache.xbean.recipe.ObjectRecipe.internalCreate(ObjectRecipe.java:286)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:96)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:61)
	at org.apache.xbean.recipe.AbstractRecipe.create(AbstractRecipe.java:49)
	at
org.apache.openejb.assembler.classic.Assembler.createResource(Assembler.java:1733)
	at
org.apache.openejb.assembler.classic.Assembler.buildContainerSystem(Assembler.java:425)
	at org.apache.openejb.assembler.classic.Assembler.build(Assembler.java:344)
	... 17 more
Caused by: java.lang.NullPointerException
	at java.util.Hashtable.put(Hashtable.java:432)
	at java.util.Properties.setProperty(Properties.java:161)
	at
org.apache.tomcat.jdbc.pool.DataSourceProxy.setUsername(DataSourceProxy.java:416)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at
org.apache.xbean.recipe.ObjectRecipe$MethodMember.setValue(ObjectRecipe.java:641)
	at org.apache.xbean.recipe.ObjectRecipe.setProperty(ObjectRecipe.java:512)
	... 25 more



--
View this message in context: http://openejb.979440.n4.nabble.com/tomee-1-5-1-datasource-creation-failed-with-an-empty-UserName-tp4660030.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message