Trying to setup Orbeon + Tomcat + MySql with relational database - mysql
i am having trouble here at my work trying to setup Orbeon to use relational databases running on tomcat and mysql.
So i am an as3 programmer that makes games and doing this is quite difficult for me.
I've setup Orbeon forms already, i have a mysql server running, now i have to link it to tomcat and orbeon.
(im running ubuntu servere)
I have apache tomcat 7,
orbeon form 4.10 PE .
Mysql (lastest (?))
This is my server.xml
<Resource name="jdbc/mysql"
auth="Container"
type="javax.sql.DataSource"
initialsize="3"
driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/?useUnicode=true& amp;characterEncoding=UTF8"
maxActive="15"
maxIdle="20"
maxWait="30000"
username="root"
password="orbeonadmin2015"
/>
my "catalina.out"
sep 07, 2015 12:22:05 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:05 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:08 PM org.apache.coyote.AbstractProtocol init
INFORMACIÓN: Initializing ProtocolHandler ["http-bio-8080"]
sep 07, 2015 12:22:08 PM org.apache.catalina.startup.Catalina load
INFORMACIÓN: Initialization processed in 1780 ms
sep 07, 2015 12:22:08 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
ADVERTENCIA: maxIdle is larger than maxActive, setting maxIdle to: 15
sep 07, 2015 12:22:09 PM org.apache.catalina.core.StandardService startInternal
INFORMACIÓN: Arrancando servicio Catalina
sep 07, 2015 12:22:09 PM org.apache.catalina.core.StandardEngine startInternal
INFORMACIÓN: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
sep 07, 2015 12:22:09 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/examples.xml
sep 07, 2015 12:22:10 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/host-manager.xml
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/docs.xml
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/manager.xml
sep 07, 2015 12:22:12 PM org.apache.catalina.startup.HostConfig deployWAR
INFORMACIÓN: Despliegue del archivo /var/lib/tomcat7/webapps/orbeon.war de la aplicación web
sep 07, 2015 12:22:23 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
GRAVE: Unable to create initial connections of pool.
java.sql.SQLException
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:486)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:554)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:242)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1091)
at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:670)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:269)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
... 32 more
sep 07, 2015 12:22:23 PM org.apache.naming.NamingContext lookup
ADVERTENCIA: Excepción inesperada resolviendo referencia
java.sql.SQLException
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:486)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:554)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:242)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:321)
at org.apache.naming.NamingContext.lookup(NamingContext.java:842)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.NamingContext.lookup(NamingContext.java:830)
at org.apache.naming.NamingContext.lookup(NamingContext.java:167)
at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1091)
at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:670)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:269)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
... 32 more
sep 07, 2015 12:22:23 PM org.apache.catalina.core.NamingContextListener addResource
ADVERTENCIA: No pude registrar en JMX: javax.naming.NamingException
Starting Orbeon Forms 4.10.0.201508261723 PE
Initializing Resource Manager with: {oxf.resources.priority.2.oxf.resources.webapp.rootdir=/WEB-INF/resources, org.orbeon.oxf.resources.WebAppResourceManagerImplWebAppContext=org.orbeon.oxf.webapp.ServletWebAppContext#2f4be7b5, oxf.resources.factory=org.orbeon.oxf.resources.PriorityResourceManagerFactory, oxf.resources.priority.2=org.orbeon.oxf.resources.WebAppResourceManagerFactory, oxf.resources.priority.4=org.orbeon.oxf.resources.ClassLoaderResourceManagerFactory}
Using run mode: prod
Using properties file: oxf:/config/properties-prod.xml
This installation of Orbeon Forms 4.10.0.201508261723 PE is licensed to: Leandro / MIW / leandrom#makeitwork.com.uy and expires on 2015-12-02
log4j:ERROR setFile(null,false) call failed.
java.io.FileNotFoundException: ../logs/orbeon.log (No existe el archivo o el directorio)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:221)
at java.io.FileOutputStream.<init>(FileOutputStream.java:142)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:295)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523)
at org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:492)
at org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1006)
at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:887)
at org.apache.log4j.xml.DOMConfigurator.configure(DOMConfigurator.java:704)
at org.orbeon.oxf.util.LoggerFactory.initLogger(LoggerFactory.java:95)
at org.orbeon.oxf.webapp.Orbeon$.initialize(Orbeon.scala:81)
at org.orbeon.oxf.webapp.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:117)
at org.orbeon.oxf.webapp.OrbeonWebApp$$anonfun$1.apply(WebAppContext.scala:117)
at scala.collection.mutable.MapLike$class.getOrElseUpdate(MapLike.scala:194)
at org.orbeon.oxf.webapp.ParametersAndAttributes$$anon$1.getOrElseUpdate(WebAppContext.scala:93)
at org.orbeon.oxf.webapp.OrbeonWebApp$class.$init$(WebAppContext.scala:117)
at org.orbeon.oxf.webapp.ServletWebAppContext.<init>(WebAppContext.scala:122)
at org.orbeon.oxf.webapp.WebAppContext$.apply(WebAppContext.scala:167)
at org.orbeon.oxf.pipeline.InitUtils$.runWithServletContext(InitUtils.scala:170)
at org.orbeon.oxf.webapp.OrbeonServletContextListener$$anonfun$contextInitialized$1.apply$mcV$sp(OrbeonServletContextListener.scala:40)
at org.orbeon.oxf.webapp.OrbeonServletContextListener$$anonfun$contextInitialized$1.apply(OrbeonServletContextListener.scala:40)
at org.orbeon.oxf.webapp.OrbeonServletContextListener$$anonfun$contextInitialized$1.apply(OrbeonServletContextListener.scala:40)
at org.orbeon.oxf.util.ScalaUtils$.withRootException(ScalaUtils.scala:83)
at org.orbeon.oxf.webapp.OrbeonServletContextListener.contextInitialized(OrbeonServletContextListener.scala:39)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4973)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5467)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
sep 07, 2015 12:22:28 PM org.apache.catalina.startup.HostConfig deployDirectory
INFORMACIÓN: Despliegue del directorio /var/lib/tomcat7/webapps/ROOT de la aplicación web
sep 07, 2015 12:22:29 PM org.apache.coyote.AbstractProtocol start
INFORMACIÓN: Starting ProtocolHandler ["http-bio-8080"]
sep 07, 2015 12:22:29 PM org.apache.catalina.startup.Catalina start
INFORMACIÓN: Server startup in 20949 ms
And another log:
GRAVE: La aplicación web [/orbeon] parece haber arrancado un hilo llamado [Abandoned connection cleanup thread] pero no ha podido pararlo. Esto tiene todas las papeletas de convertirse en un fallo de memoria.
sep 07, 2015 12:22:03 PM org.apache.coyote.AbstractProtocol stop
INFORMACIÓN: Stopping ProtocolHandler ["http-bio-8080"]
sep 07, 2015 12:22:03 PM org.apache.coyote.AbstractProtocol destroy
INFORMACIÓN: Destroying ProtocolHandler ["http-bio-8080"]
sep 07, 2015 12:22:05 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/common/classes], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:05 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/common], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/server/classes], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/server], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/shared/classes], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:06 PM org.apache.catalina.startup.ClassLoaderFactory validateFile
ADVERTENCIA: Problem with directory [/usr/share/tomcat7/shared], exists: [false], isDirectory: [false], canRead: [false]
sep 07, 2015 12:22:08 PM org.apache.coyote.AbstractProtocol init
INFORMACIÓN: Initializing ProtocolHandler ["http-bio-8080"]
sep 07, 2015 12:22:08 PM org.apache.catalina.startup.Catalina load
INFORMACIÓN: Initialization processed in 1780 ms
sep 07, 2015 12:22:08 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
ADVERTENCIA: maxIdle is larger than maxActive, setting maxIdle to: 15
sep 07, 2015 12:22:09 PM org.apache.catalina.core.StandardService startInternal
INFORMACIÓN: Arrancando servicio Catalina
sep 07, 2015 12:22:09 PM org.apache.catalina.core.StandardEngine startInternal
INFORMACIÓN: Starting Servlet Engine: Apache Tomcat/7.0.52 (Ubuntu)
sep 07, 2015 12:22:09 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/examples.xml
sep 07, 2015 12:22:10 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/core_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/core is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/fmt_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/fmt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/fmt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/functions is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/permittedTaglibs is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://jakarta.apache.org/taglibs/standard/scriptfree is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/sql_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/sql is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/sql is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/xml_rt is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jstl/xml is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.TaglibUriRule body
INFORMACIÓN: TLD skipped. URI: http://java.sun.com/jsp/jstl/xml is already defined
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/host-manager.xml
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/docs.xml
sep 07, 2015 12:22:11 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFORMACIÓN: Desplieque del descriptor de configuración /etc/tomcat7/Catalina/localhost/manager.xml
sep 07, 2015 12:22:12 PM org.apache.catalina.startup.HostConfig deployWAR
INFORMACIÓN: Despliegue del archivo /var/lib/tomcat7/webapps/orbeon.war de la aplicación web
sep 07, 2015 12:22:23 PM org.apache.tomcat.jdbc.pool.ConnectionPool init
GRAVE: Unable to create initial connections of pool.
java.sql.SQLException
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:486)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:144)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.pCreatePool(DataSourceProxy.java:116)
at org.apache.tomcat.jdbc.pool.DataSourceProxy.createPool(DataSourceProxy.java:103)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.createDataSource(DataSourceFactory.java:554)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:242)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:141)
at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1091)
at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:670)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:269)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:274)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:246)
... 32 more
sep 07, 2015 12:22:23 PM org.apache.naming.NamingContext lookup
ADVERTENCIA: Excepción inesperada resolviendo referencia
java.sql.SQLException
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:254)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:701)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:635)
Related
Set the correct currency form via Google apps script
Hello dear community, I would like to bring all my values to the German currency format. I can use the following function to retrieve all the data I want to change and only need to bring them to the correct format with a formula. It will also retrieve data which is not a currency, that should be disregarded. So Current English format: 10.00€ Should be changed to German format Also only the full numbers should be displayed, so not 10,00€ but 10€. Maybe someone has a simple solution, thanks. function setTheRightFormula() { let getRangeFirstTable = overview.getRange(4, 3, 3, 3) let getRangeSecondTable = overview.getRange(9, 3, 3, 3) let getRangeThirdTable = overview.getRange(14, 3, 4, 5) var valuesFirstTable = getRangeFirstTable.getValues(); var valuesSecondTable = getRangeSecondTable.getValues(); var valuesThirdTable = getRangeThirdTable.getValues(); valuesFirstTable.forEach(function(row) { row.forEach(function(col) { //Logger.log(col); }); }); valuesSecondTable.forEach(function(row) { row.forEach(function(col) { Logger.log(col); }); }); valuesThirdTable.forEach(function(row) { row.forEach(function(col) { Logger.log(col); }); }); } This is what the Console outputs. 11:48:33 PM Info 220.0 11:48:33 PM Info 14.5 11:48:33 PM Info 3190.0 11:48:33 PM Info 662.0 11:48:33 PM Info 14.5 11:48:33 PM Info 9599.0 11:48:33 PM Info 882.0 11:48:33 PM Info 11:48:33 PM Info 12789.0 11:48:33 PM Info 9.0 11:48:33 PM Info 3190.0 11:48:33 PM Info 354.44444444444446 11:48:33 PM Info 53.0 11:48:33 PM Info 9599.0 11:48:33 PM Info 181.11320754716982 11:48:33 PM Info 62.0 11:48:33 PM Info 12789.0 11:48:33 PM Info 206.2741935483871 11:48:33 PM Info 9.0 11:48:33 PM Info 1200.0 11:48:33 PM Info 10800.0 11:48:33 PM Info 3190.0 11:48:33 PM Info 7610.0 11:48:33 PM Info 53.0 11:48:33 PM Info 1200.0 11:48:33 PM Info 63600.0 11:48:33 PM Info 9599.0 11:48:33 PM Info 54001.0 11:48:33 PM Info 13.25 11:48:33 PM Info 1200.0 11:48:33 PM Info 15900.0 11:48:33 PM Info Ohne Berechnung 11:48:33 PM Info 15900.0 11:48:33 PM Info 75.25 11:48:33 PM Info 11:48:33 PM Info 90300.0 11:48:33 PM Info 12789.0 11:48:33 PM Info 77511.0
404 Not Found:The origin server did not find a current representation for the target resource or is not willing to disclose that one exists
This is the error I am getting I am using Gradle as build tool I have tried all the solutions on internet Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version name: Apache Tomcat/9.0.27 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server built: Oct 7 2019 09:57:22 UTC Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Server version number: 9.0.27.0 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Name: Linux Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: OS Version: 5.0.0-32-generic Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Architecture: amd64 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Java Home: /usr/lib/jvm/java-8-openjdk-amd64/jre Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Version: 1.8.0_222-8u222-b10-1ubuntu1~18.04.1-b10 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: JVM Vendor: Private Build Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_BASE: /home/sudarshan/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp1 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: CATALINA_HOME: /home/sudarshan/Downloads/apache-tomcat-9.0.27 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: - Dcatalina.base=/home/sudarshan/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp1 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dcatalina.home=/home/sudarshan/Downloads/apache-tomcat-9.0.27 Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: - Dwtp.deploy=/home/sudarshan/work/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/ wtpwebapps Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Djava.endorsed.dirs=/home/sudarshan/Downloads/apache-tomcat- 9.0.27/endorsed Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.VersionLoggerListener log INFO: Command line argument: -Dfile.encoding=UTF-8 Oct 24, 2019 3:01:35 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [/usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux- gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib] Oct 24, 2019 3:01:35 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-nio-2016"] Oct 24, 2019 3:01:35 PM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-nio-8009"] Oct 24, 2019 3:01:35 PM org.apache.catalina.startup.Catalina load INFO: Server initialization in [549] milliseconds Oct 24, 2019 3:01:35 PM org.apache.catalina.core.StandardService startInternal INFO: Starting service [Catalina] Oct 24, 2019 3:01:35 PM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet engine: [Apache Tomcat/9.0.27] Oct 24, 2019 3:01:36 PM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath Oct 24, 2019 3:01:37 PM org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Oct 24, 2019 3:01:37 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Error configuring application listener of class [org.springframework.web.context.ContextLoaderListener] java.lang.NoClassDefFoundError: Lorg/springframework/beans/factory/access/BeanFactoryReference; at java.lang.Class.getDeclaredFields0(Native Method) at java.lang.Class.privateGetDeclaredFields(Class.java:2583) at java.lang.Class.getDeclaredFields(Class.java:1916) at org.apache.catalina.util.Introspection.getDeclaredFields(Introspection.java:110) at org.apache.catalina.core.DefaultInstanceManager.populateAnnotationsCache (DefaultInstanceManager.java:402) at org.apache.catalina.core.DefaultInstanceManager.newInstance (DefaultInstanceManager.java:173) at org.apache.catalina.core.DefaultInstanceManager.newInstance (DefaultInstanceManager.java:151) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4607) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5146) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute (InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.tomcat.util.threads.InlineExecutorService.execute (InlineExecutorService.java:75) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909) at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.startup.Catalina.start(Catalina.java:633) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475) Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.access.BeanFactoryReference at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188) ... 37 more Oct 24, 2019 3:01:37 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Skipped installing application listeners due to previous error(s) Oct 24, 2019 3:01:37 PM org.apache.catalina.core.StandardContext startInternal SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file Oct 24, 2019 3:01:37 PM org.apache.catalina.core.StandardContext startInternal SEVERE: Context [/HibernateTemplate] startup failed due to previous errors Oct 24, 2019 3:01:37 PM org.apache.catalina.core.ApplicationContext log INFO: No Spring WebApplicationInitializer types detected on classpath Oct 24, 2019 3:01:37 PM org.apache.jasper.servlet.TldScanner scanJars INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Oct 24, 2019 3:01:37 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext Oct 24, 2019 3:01:37 PM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization started Oct 24, 2019 3:01:37 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing Root WebApplicationContext: startup date [Thu Oct 24 15:01:37 IST 2019]; root of context hierarchy Oct 24, 2019 3:01:38 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-core- config.xml] Oct 24, 2019 3:01:38 PM org.springframework.web.context.ContextLoader initWebApplicationContext INFO: Root WebApplicationContext: initialization completed in 188 ms Oct 24, 2019 3:01:38 PM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'springDispatcherServlet' Oct 24, 2019 3:01:38 PM org.springframework.web.servlet.FrameworkServlet initServletBean INFO: FrameworkServlet 'springDispatcherServlet': initialization started Oct 24, 2019 3:01:38 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh INFO: Refreshing WebApplicationContext for namespace 'springDispatcherServlet-servlet': startup date [Thu Oct 24 15:01:38 IST 2019]; parent: Root WebApplicationContext Oct 24, 2019 3:01:38 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/spring-mvc- config.xml] Oct 24, 2019 3:01:38 PM org.springframework.web.servlet.handler.AbstractUrlHandlerMapping registerHandler INFO: Root mapping to handler 'homeController' Oct 24, 2019 3:01:38 PM org.springframework.web.servlet.FrameworkServlet initServletBean INFO: FrameworkServlet 'springDispatcherServlet': initialization completed in 425 ms Oct 24, 2019 3:01:38 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-nio-2016"] Oct 24, 2019 3:01:38 PM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-nio-8009"] Oct 24, 2019 3:01:38 PM org.apache.catalina.startup.Catalina start INFO: Server startup in [2,794] milliseconds This is my build.gradle where I have added required dependencies plugins { // Apply the java-library plugin to add support for Java Library id 'java-library' id 'war' id 'org.gretty' version '2.3.1' } repositories { jcenter() } dependencies { // This dependency is exported to consumers, that is to say found on their compile classpath. api 'org.apache.commons:commons-math3:3.6.1' // This dependency is used internally, and not exposed to consumers on their own compile classpath. implementation 'com.google.guava:guava:28.0-jre' // https://mvnrepository.com/artifact/org.springframework/spring-web compile group: 'org.springframework', name: 'spring-web', version: '4.3.13.RELEASE' // https://mvnrepository.com/artifact/org.springframework/spring-webmvc compile group: 'org.springframework', name: 'spring-webmvc', version: '4.3.14.RELEASE' // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api providedCompile group: 'javax.servlet', name: 'javax.servlet-api', version: '4.0.1' // https://mvnrepository.com/artifact/javax.servlet/jstl compile group: 'javax.servlet', name: 'jstl', version: '1.2' // https://mvnrepository.com/artifact/mysql/mysql-connector-java compile group: 'mysql', name: 'mysql-connector-java', version: '8.0.13' // https://mvnrepository.com/artifact/org.springframework/spring-jdbc compile group: 'org.springframework', name: 'spring-jdbc', version: '5.1.5.RELEASE' // https://mvnrepository.com/artifact/org.springframework/spring-beans compile group: 'org.springframework', name: 'spring-beans', version: '5.1.5.RELEASE' // Use JUnit test framework testImplementation 'junit:junit:4.12' } This is my spring-core-config.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> </beans> This is my spring-mvc-config.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd"> <context:component-scan base-package="HibernateTemplate"></context:component-scan> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean> <bean id="ds" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver"></property> <property name="url" value="jdbc:mysql://localhost:3306/userdb"></property> <property name="username" value="root"></property> <property name="password" value="password"></property> </bean> <bean id="jt" class="org.springframework.jdbc.core.JdbcTemplate"> <property name="dataSource" ref="ds"></property> </bean> <bean id="dao" class="HibernateTemplate.StudentDao"> <property name="template" ref="jt"></property> </bean> </beans> This is my web.xml <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web- app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>web application</display-name> <!-- The front controller of this Spring Web application, responsible for handling all application requests --> <servlet> <servlet-name>springDispatcherServlet</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-mvc-config.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <!-- Map all requests to the DispatcherServlet for handling --> <servlet-mapping> <servlet-name>springDispatcherServlet</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <context-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/spring-core-config.xml</param-value> </context-param> </web-app> This is my index.jsp <%# page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> Add Employee <!-- View Employees --> </body> </html> studform.jsp file where I have created form to take values. <%# page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> Add Employee <!-- View Employees --> </body> </html> index.jsp page <%# page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> </head> <body> Add Employee <!-- View Employees --> </body> </html> Student.java class package HibernateTemplate; public class Student { private int id; private String name; private String email; public int getId() { return id; } public void setId(int id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } } StudentController class package HibernateTemplate; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import HibernateTemplate.Student; import HibernateTemplate.StudentDao; #Controller public class StudentController { #Autowired StudentDao dao; /*It displays a form to input data, here "command" is a reserved request attribute which is used to display object data into form */ #RequestMapping("/studform") public String showform(Model m){ m.addAttribute("command", new Student()); return "studform"; } /*It saves object into database. The #ModelAttribute puts request data into model object. *You need to mention RequestMethod.POST method because default request is GET*/ #RequestMapping(value="/save",method = RequestMethod.POST) public String save(#ModelAttribute("std") Student std){ dao.save(std); return "save"; //will redirect to viewemp request mapping } } StudentDao class package HibernateTemplate; import org.springframework.jdbc.core.JdbcTemplate; public class StudentDao { JdbcTemplate template; public void setTemplate(JdbcTemplate template) { this.template = template; } public int save(Student s){ String sql="insert into student(id,name,email) values('"+s.getId()+"',"+s.getName()+",'"+s.getEmail()+"')"; return template.update(sql); } } I just needs to connect with database so that I can go ahead and do further operations, also you can recommend me book where I can learn spring MVC using gradle as there is no gradle stuff available on internet.
Try by removing this from <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> from <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">. I think this unnecessarily used. This may cause problem. Updated bean should look like this : <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean>
localhost:8080 this site can't be reached
I have xampp installed on my windows 8.1 32-bit. apache and MySQL are running. and i am having kind of weird problem. after a restart of my machine localhost runs but only and if tried reloading it won't load. so i tried some solutions over the internet, include clearing my cache. so i tried clearing my cache, localhost loaded but again only for one time, tried reloading it, but won't load . here is the error log for the day [Thu Jul 07 01:09:02.134872 2016] [access_compat:error] [pid 8272:tid 1776] [client 100.93.115.237:57084] AH01797: client denied by server configuration: C:/xampp/htdocs/xampp/ [Thu Jul 07 12:27:38.232732 2016] [core:warn] [pid 5548:tid 392] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Thu Jul 07 12:27:38.772405 2016] [ssl:warn] [pid 5548:tid 392] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Jul 07 12:27:42.577513 2016] [mpm_winnt:notice] [pid 5548:tid 392] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations [Thu Jul 07 12:27:42.577513 2016] [mpm_winnt:notice] [pid 5548:tid 392] AH00456: Server built: Aug 18 2012 12:41:37 [Thu Jul 07 12:27:42.577513 2016] [core:notice] [pid 5548:tid 392] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Thu Jul 07 12:27:42.624392 2016] [mpm_winnt:notice] [pid 5548:tid 392] AH00418: Parent: Created child process 1128 [Thu Jul 07 12:27:44.139436 2016] [ssl:warn] [pid 1128:tid 356] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Jul 07 12:27:44.266630 2016] [mpm_winnt:notice] [pid 1128:tid 356] AH00354: Child: Starting 150 worker threads. [Thu Jul 07 12:30:38.084960 2016] [core:warn] [pid 6960:tid 376] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Thu Jul 07 12:30:38.412969 2016] [ssl:warn] [pid 6960:tid 376] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Jul 07 12:30:38.472973 2016] [mpm_winnt:notice] [pid 6960:tid 376] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations [Thu Jul 07 12:30:38.472973 2016] [mpm_winnt:notice] [pid 6960:tid 376] AH00456: Server built: Aug 18 2012 12:41:37 [Thu Jul 07 12:30:38.472973 2016] [core:notice] [pid 6960:tid 376] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Thu Jul 07 12:30:39.464998 2016] [mpm_winnt:notice] [pid 6960:tid 376] AH00418: Parent: Created child process 5448 [Thu Jul 07 12:30:40.893037 2016] [ssl:warn] [pid 5448:tid 348] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Jul 07 12:30:40.957041 2016] [mpm_winnt:notice] [pid 5448:tid 348] AH00354: Child: Starting 150 worker threads. [Thu Jul 07 13:16:55.613227 2016] [core:warn] [pid 5772:tid 392] AH00098: pid file C:/xampp/apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run? [Thu Jul 07 13:16:55.910117 2016] [ssl:warn] [pid 5772:tid 392] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Jul 07 13:16:56.925786 2016] [mpm_winnt:notice] [pid 5772:tid 392] AH00455: Apache/2.4.3 (Win32) OpenSSL/1.0.1c PHP/5.4.7 configured -- resuming normal operations [Thu Jul 07 13:16:56.925786 2016] [mpm_winnt:notice] [pid 5772:tid 392] AH00456: Server built: Aug 18 2012 12:41:37 [Thu Jul 07 13:16:56.925786 2016] [core:notice] [pid 5772:tid 392] AH00094: Command line: 'c:\\xampp\\apache\\bin\\httpd.exe -d C:/xampp/apache' [Thu Jul 07 13:16:57.082044 2016] [mpm_winnt:notice] [pid 5772:tid 392] AH00418: Parent: Created child process 5560 [Thu Jul 07 13:16:58.566490 2016] [ssl:warn] [pid 5560:tid 396] AH01873: Init: Session Cache is not configured [hint: SSLSessionCache] [Thu Jul 07 13:16:58.707150 2016] [mpm_winnt:notice] [pid 5560:tid 396] AH00354: Child: Starting 150 worker threads.
Atomikos: exception when transaction contains more than one persist
I'm experimenting with standalone JPA and JTA / XA transaction management provided by Atomikos. My simple unit test persists 3 records, wrapped in a JTA UserTransaction. When using H2 as backing database, the test works fine. When using MySQL as the backing database, the second persist throws this exception: com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_INVAL: Invalid arguments (or unsupported command) (see full stack trace and logging below). The log file gives more detail: WARNING: XA resource 'jdbc/mysqlDs': resume for XID '3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32' raised -5: invalid arguments were given for the XA operation If I leave only a single persist in the test, it succeeds. The same test also succeeds when using H2 instead of MySQL. So question: what could be the cause of the exception in the case of MySQL? Here is the main test code from JtaJpaMySQLAtomikosTest.java: #Test public void testSingleCommitMySql() throws Exception { EntityManagerFactory emf = Persistence.createEntityManagerFactory("javaee7.standalone.jta.pu_mysql"); EntityManager em = emf.createEntityManager(); UserTransaction userTransaction = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction"); userTransaction.begin(); em.joinTransaction(); em.persist(new TestEntity("FOO", "A")); em.persist(new TestEntity("BAR", "B")); em.persist(new TestEntity("BAZ", "C")); em.flush(); userTransaction.commit(); TypedQuery<TestEntity> query = em.createQuery("SELECT b FROM TestEntity b WHERE name = :name", TestEntity.class) .setParameter("name", "FOO"); assertEquals("A", query.getSingleResult().getValue()); em.close(); emf.close(); } If you need the full test code, let me know. Here's the relevant portion of the logging + exception: INFO: AtomikosDataSoureBean 'jdbc/mysqlDs': getConnection ( null )... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: AtomikosDataSoureBean 'jdbc/mysqlDs': init... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling getAutoCommit... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling getMetaData... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling createStatement... Apr 28, 2016 12:34:57 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: HHH000396: Updating schema Apr 28, 2016 12:34:57 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000261: Table found: twophasepoc.testentity Apr 28, 2016 12:34:57 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000037: Columns: [name, id, value] Apr 28, 2016 12:34:57 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000108: Foreign keys: [] Apr 28, 2016 12:34:57 PM org.hibernate.tool.hbm2ddl.TableMetadata <init> INFO: HHH000126: Indexes: [primary] Apr 28, 2016 12:34:57 PM org.hibernate.tool.hbm2ddl.SchemaUpdate execute INFO: HHH000232: Schema update complete Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling getWarnings... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling clearWarnings... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: close()... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: createCompositeTransaction ( 10000 ): created new ROOT transaction with id 192.168.14.117.tm0000200081 Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: registerSynchronization ( com.atomikos.icatch.jta.Sync2Sync#4e517165 ) for transaction 192.168.14.117.tm0000200081 Hibernate: insert into TestEntity (name, value) values (?, ?) Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: AtomikosDataSoureBean 'jdbc/mysqlDs': getConnection ( null )... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: AtomikosDataSoureBean 'jdbc/mysqlDs': init... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: addParticipant ( XAResourceTransaction: 3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32 ) for transaction 192.168.14.117.tm0000200081 Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: XAResource.start ( 3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32 , XAResource.TMNOFLAGS ) on resource jdbc/mysqlDs represented by XAResource instance com.mysql.jdbc.jdbc2.optional.JDBC4MysqlXAConnection#16ecee1 Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: registerSynchronization ( com.atomikos.jdbc.AtomikosConnectionProxy$JdbcRequeueSynchronization#35a707b3 ) for transaction 192.168.14.117.tm0000200081 Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling prepareStatement(insert into TestEntity (name, value) values (?, ?),1)... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: isClosed()... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling getWarnings... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: calling clearWarnings... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: atomikos connection proxy for com.mysql.jdbc.jdbc2.optional.JDBC4ConnectionWrapper#1bb266b3: close()... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: XAResource.end ( 3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32 , XAResource.TMSUCCESS ) on resource jdbc/mysqlDs represented by XAResource instance com.mysql.jdbc.jdbc2.optional.JDBC4MysqlXAConnection#16ecee1 Hibernate: insert into TestEntity (name, value) values (?, ?) Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: AtomikosDataSoureBean 'jdbc/mysqlDs': getConnection ( null )... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: AtomikosDataSoureBean 'jdbc/mysqlDs': init... Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: addParticipant ( XAResourceTransaction: 3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32 ) for transaction 192.168.14.117.tm0000200081 Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: XAResource.start ( 3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32 , XAResource.TMJOIN ) on resource jdbc/mysqlDs represented by XAResource instance com.mysql.jdbc.jdbc2.optional.JDBC4MysqlXAConnection#16ecee1 Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logWarning WARNING: XA resource 'jdbc/mysqlDs': resume for XID '3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32' raised -5: invalid arguments were given for the XA operation com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_INVAL: Invalid arguments (or unsupported command) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:581) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:566) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:507) at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:427) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:59) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:64) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:223) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:142) at com.sun.proxy.$Proxy12.prepareStatement(Unknown Source) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$2.doPrepare(StatementPreparerImpl.java:124) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:122) at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.prepare(IdentityGenerator.java:89) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:55) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3032) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3556) at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:97) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:480) at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:191) at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:175) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:210) at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:324) at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:194) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125) at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:84) at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:206) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:149) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:807) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:780) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:785) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181) at JtaJpaMySQLAtomikosTest.testSingleCommitMySql(JtaJpaMySQLAtomikosTest.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Caused by: java.sql.SQLException: XAER_INVAL: Invalid arguments (or unsupported command) at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2547) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2505) at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840) at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:560) ... 60 more Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logWarning WARNING: Error enlisting in transaction - connection might be broken? Please check the logs for more information... com.atomikos.datasource.ResourceException: XA resource 'jdbc/mysqlDs': resume for XID '3139322E3136382E31342E3131372E746D30303030323030303831:3139322E3136382E31342E3131372E746D32' raised -5: invalid arguments were given for the XA operation at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:434) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:59) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:64) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:223) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:142) at com.sun.proxy.$Proxy12.prepareStatement(Unknown Source) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$2.doPrepare(StatementPreparerImpl.java:124) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186) at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareStatement(StatementPreparerImpl.java:122) at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.prepare(IdentityGenerator.java:89) at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:55) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3032) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3556) at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:97) at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:480) at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:191) at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:175) at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:210) at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:324) at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:288) at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:194) at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:125) at org.hibernate.jpa.event.internal.core.JpaPersistEventListener.saveWithGeneratedId(JpaPersistEventListener.java:84) at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:206) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:149) at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:75) at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:807) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:780) at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:785) at org.hibernate.jpa.spi.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:1181) at JtaJpaMySQLAtomikosTest.testSingleCommitMySql(JtaJpaMySQLAtomikosTest.java:88) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:30) at org.junit.runners.ParentRunner.run(ParentRunner.java:300) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) Apr 28, 2016 12:34:57 PM com.atomikos.logging.JULLogger logInfo INFO: setRollbackOnly() called for transaction 192.168.14.117.tm0000200081 Here's the persistence.xml: <?xml version="1.0" encoding="UTF-8"?> <persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd" version="2.1"> <persistence-unit name="javaee7.standalone.jta.pu_mysql" transaction-type="JTA"> <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider> <jta-data-source>jdbc/mysqlDs</jta-data-source> <class>TestEntity</class> <properties> <property name="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"/> <property name="hibernate.show_sql" value="true"/> <property name="hibernate.format_sql" value="true"/> <property name="hibernate.hbm2ddl.auto" value="update"/> <property name="hibernate.transaction.jta.platform" value="AtomikosJtaPlatform"/> </properties> </persistence-unit> </persistence>
The is could be for MySQL server limitation of XA support, https://dev.mysql.com/doc/refman/5.5/en/xa-statements.html Also might be for the known problem of atomikos https://www.atomikos.com/Documentation/KnownProblems#ActiveMQ_error:_34Transaction_39XID:..._39_has_not_been_started_34 this could be a solution https://www.atomikos.com/Documentation/NonXaDataSource Refer to geert3 comment below for more specific solution. Following links can be explored https://community.oracle.com/thread/2326795 http://fogbugz.atomikos.com/default.asp?community.6.3215.2
pinGlobalTxToPhysicalConnection=true solved my problem. Although I have not set com.atomikos.icatch.serial_jta_transactions=false as I was not sure how to set this in Spring Boot. For those who are looking how to set pingGlobalTxToPhysicalConnection property, it needs to be appended to connection string like below jdbc:mariadb://localhost:3306/MYDB?pinGlobalTxToPhysicalConnection=true
SOLR DataImport Error "Unable to Execute Query"
I have a website running on an Amazon EC2 Instance, and I'm trying to get Solr to interface and work with the database I'm using. I'm able to use the admin interface and have gotten the example xml files indexed, but whenever I try to import one of my database tables, I get the error SEVERE: Exception while processing: gamelydb document : SolrInputDocument[{}]:org.apache.solr.handler.dataimport.DataImportHandlerException: Unable to execute query: SELECT * FROM league Processing Document # 1 Here's my data-config.xml file. I also added the dataimporthandler to the solrconfig.xml file. <dataConfig> <dataSource type="JdbcDataSource" driver="com.mysql.jdbc.Driver" url="jdbc:mysql://www.mysite.com/mydb" user="root" password="mypassword"/> <document> <entity name="mydb" query="SELECT * FROM league"> <field column="id" name="id" /> <field column="leaguename" name="leaguename" /> </entity> </document> </dataConfig> Any idea why this is happening? And just let me know if I need to clarify anything. So I changed the url a bit and removed the 'http://' and that error seemed to go away. However none of the information seems to be searchable through the admin. There are now a few files in the data directory (_1.fnm, _1.frq,...). Here is what solr prints to the log. Jul 13, 2011 1:19:45 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/dataimport params={} status=0 QTime=4 Jul 13, 2011 1:19:48 PM org.apache.solr.core.SolrCore execute INFO: [] webapp=/solr path=/dataimport params={command=full-import} status=0 QTime=4 Jul 13, 2011 1:19:48 PM org.apache.solr.handler.dataimport.DataImporter doFullImport INFO: Starting Full Import Jul 13, 2011 1:19:48 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties INFO: Read dataimport.properties Jul 13, 2011 1:19:48 PM org.apache.solr.update.DirectUpdateHandler2 deleteAll INFO: [] REMOVING ALL DOCUMENTS FROM INDEX Jul 13, 2011 1:19:48 PM org.apache.solr.core.SolrDeletionPolicy onInit INFO: SolrDeletionPolicy.onInit: commits:num=1 commit{dir=/home/ec2-user/public_html/solr/example/solr/data/index,segFN=segments_2,version=1310405039852,generation=2,filenames=[_0.tis, _0.nrm, _0.fnm, _0.tii, _0.frq, segments_2, _0.fdx, _0.fdt] Jul 13, 2011 1:19:48 PM org.apache.solr.core.SolrDeletionPolicy updateCommits INFO: newest commit = 1310405039852 Jul 13, 2011 1:19:48 PM org.apache.solr.handler.dataimport.JdbcDataSource$1 call INFO: Creating a connection for entity gamelydb with URL: jdbc:mysql://www.gamely.us/gamelydb Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.JdbcDataSource$1 call INFO: Time taken for getConnection(): 667 Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.DocBuilder finish INFO: Import completed successfully Jul 13, 2011 1:19:49 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: start commit(optimize=true,waitFlush=false,waitSearcher=true,expungeDeletes=false) Jul 13, 2011 1:19:49 PM org.apache.solr.core.SolrDeletionPolicy onCommit INFO: SolrDeletionPolicy.onCommit: commits:num=2 commit{dir=/home/ec2-user/public_html/solr/example/solr/data/index,segFN=segments_2,version=1310405039852,generation=2,filenames=[_0.tis, _0.nrm, _0.fnm, _0.tii, _0.frq, segments_2, _0.fdx, _0.fdt] commit{dir=/home/ec2-user/public_html/solr/example/solr/data/index,segFN=segments_3,version=1310405039855,generation=3,filenames=[_1.fdx, _1.tis, _1.frq, _1.fdt, _1.tii, _1.fnm, _1.nrm, segments_3] Jul 13, 2011 1:19:49 PM org.apache.solr.core.SolrDeletionPolicy updateCommits INFO: newest commit = 1310405039855 Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher <init> INFO: Opening Searcher#1c4795e main Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming Searcher#1c4795e main from Searcher#1d38b87 main fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming result for Searcher#1c4795e main fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming Searcher#1c4795e main from Searcher#1d38b87 main filterCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming result for Searcher#1c4795e main filterCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming Searcher#1c4795e main from Searcher#1d38b87 main queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=1,evictions=0,size=1,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming result for Searcher#1c4795e main queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming Searcher#1c4795e main from Searcher#1d38b87 main documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher warm INFO: autowarming result for Searcher#1c4795e main documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.core.QuerySenderListener newSearcher INFO: QuerySenderListener sending requests to Searcher#1c4795e main Jul 13, 2011 1:19:49 PM org.apache.solr.core.QuerySenderListener newSearcher INFO: QuerySenderListener done. Jul 13, 2011 1:19:49 PM org.apache.solr.update.DirectUpdateHandler2 commit INFO: end_commit_flush Jul 13, 2011 1:19:49 PM org.apache.solr.core.SolrCore registerSearcher INFO: [] Registered new searcher Searcher#1c4795e main Jul 13, 2011 1:19:49 PM org.apache.solr.search.SolrIndexSearcher close INFO: Closing Searcher#1d38b87 main fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} filterCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} queryResultCache{lookups=0,hits=0,hitratio=0.00,inserts=1,evictions=0,size=1,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} documentCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0} Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.SolrWriter readIndexerProperties INFO: Read dataimport.properties Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.SolrWriter persist INFO: Wrote last indexed time to /home/ec2-user/public_html/solr/example/solr/./conf/dataimport.properties Jul 13, 2011 1:19:49 PM org.apache.solr.update.processor.LogUpdateProcessor finish INFO: {deleteByQuery=*:*,add=[9, 10, 11, 12, 13, 14],optimize=} 0 4 Jul 13, 2011 1:19:49 PM org.apache.solr.handler.dataimport.DocBuilder execute INFO: Time taken = 0:0:1.66 EDIT: If you find something on here that's downvotable, please just let me know so I can fix it.
I think the problem is with the url parameter. If the MySQL database is on the same machine, then use url="jdbc:mysql://localhost/mydb" If its on www.mysite.com, then use url="jdbc:mysql://www.mysite.com/mydb" Also, your log files may have more details regarding the error - please go through the logs and post the appropriate entries here.
I faced a similar problem. My database is on the same machine. In data-config.xml, I changed the line: url="jdbc:mysql://localhost/mydb" to url="jdbc:mysql://127.0.0.1/mydb" and then things worked. Strange are the ways of Solr/Lucene!
You can try doing oone of the following troubleshotting: Use url="jdbc:mysql://localhost:1433/mydb in case the sqlDB was installed on the same machine. Check the Tomcat folder for errors (Catalina file). Enable the auditing on the database level and check the logs on it.