ehcache memory only cache attempting to store to disk - ehcache

I have the following in my ehcache.xml
<?xml version="1.0" encoding="UTF-8"?>
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd" updateCheck="false" >
<defaultCache
maxElementsInMemory="500"
eternal="false"
overflowToDisk="false"
overflowToOffHeap="false"
memoryStoreEvictionPolicy="LRU" >
<persistence strategy="none" />
</defaultCache>
<cache name="leadSourceCollectionsCache"
maxElementsInMemory="500"
eternal="false"
overflowToDisk="false"
overflowToOffHeap="false"
memoryStoreEvictionPolicy="LRU" >
<persistence strategy="none" />
</cache>
</ehcache>
When I start my server I see the following ehcache related debug output
07.08.2013 15:36:10 DEBUG-ConfigurationFactory: [Configuring ehcache from InputStream]
07.08.2013 15:36:10 DEBUG-BeanHandler: [Ignoring ehcache attribute xmlns:xsi]
07.08.2013 15:36:10 DEBUG-BeanHandler: [Ignoring ehcache attribute xsi:noNamespaceSchemaLocation]
07.08.2013 15:36:10 DEBUG-PropertyUtil: [propertiesString is null.]
07.08.2013 15:36:10 DEBUG-ConfigurationHelper: [No CacheManagerEventListenerFactory class specified. Skipping...]
07.08.2013 15:36:10 DEBUG-Cache: [No BootstrapCacheLoaderFactory class specified. Skipping...]
07.08.2013 15:36:10 DEBUG-Cache: [CacheWriter factory not configured. Skipping...]
07.08.2013 15:36:10 DEBUG-ConfigurationHelper: [No CacheExceptionHandlerFactory class specified. Skipping...]
07.08.2013 15:36:10 DEBUG-Cache: [No BootstrapCacheLoaderFactory class specified. Skipping...]
07.08.2013 15:36:10 DEBUG-Cache: [CacheWriter factory not configured. Skipping...]
07.08.2013 15:36:10 DEBUG-ConfigurationHelper: [No CacheExceptionHandlerFactory class specified. Skipping...]
07.08.2013 15:36:10 DEBUG-MemoryStore: [Initialized net.sf.ehcache.store.NotifyingMemoryStore for leadSourceCollectionsCache]
07.08.2013 15:36:10 DEBUG-Cache: [Initialised cache: leadSourceCollectionsCache]
07.08.2013 15:36:10 DEBUG-ConfigurationHelper: [CacheDecoratorFactory not configured. Skipping for 'leadSourceCollectionsCache'.]
07.08.2013 15:36:10 DEBUG-ConfigurationHelper: [CacheDecoratorFactory not configured for defaultCache. Skipping for 'leadSourceCollectionsCache'.]
07.08.2013 15:36:10 DEBUG-Cache: [No BootstrapCacheLoaderFactory class specified. Skipping...]
07.08.2013 15:36:10 DEBUG-Cache: [CacheWriter factory not configured. Skipping...]
07.08.2013 15:36:10 DEBUG-MemoryStore: [Initialized net.sf.ehcache.store.MemoryStore for leadSourceCollectionCache]
07.08.2013 15:36:10 DEBUG-DiskStorePathManager: [Using diskstore path /tmp]
07.08.2013 15:36:10 DEBUG-DiskStorePathManager: [Holding exclusive lock on /tmp/.ehcache-diskstore.lock]
07.08.2013 15:36:10 DEBUG-DiskStorageFactory: [Failed to delete file lead%0053ource%0043ollection%0043ache.index]
07.08.2013 15:36:10 DEBUG-DiskStorageFactory: [Matching data file missing (or empty) for index file. Deleting index file /tmp/lead%0053ource%0043ollection%0043ache.index]
07.08.2013 15:36:10 DEBUG-DiskStorageFactory: [Failed to delete file lead%0053ource%0043ollection%0043ache.index]
07.08.2013 15:36:10 DEBUG-Cache: [Initialised cache: leadSourceCollectionCache]
So it looks like it is creating the leadSourceCollectionCache as a memory store cache, which is what I want. However, when I call leadSourceCollectionCache.put I get the following
07.08.2013 15:37:46 DEBUG-Segment: [put added 0 on heap]
07.08.2013 15:37:46 ERROR-DiskStorageFactory: [Disk Write of 1-2 failed: ]
java.io.NotSerializableException: intouch.connector.business.LeadSourceCollection
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1181)
at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1541)
at java.io.ObjectOutputStream.defaultWriteObject(ObjectOutputStream.java:439)
at net.sf.ehcache.Element.writeObject(Element.java:835)
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:606)
at java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:988)
at java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1493)
at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429)
at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1175)
at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347)
at net.sf.ehcache.util.MemoryEfficientByteArrayOutputStream.serialize(MemoryEfficientByteArrayOutputStream.java:97)
at net.sf.ehcache.store.disk.DiskStorageFactory.serializeElement(DiskStorageFactory.java:405)
at net.sf.ehcache.store.disk.DiskStorageFactory.write(DiskStorageFactory.java:384)
at net.sf.ehcache.store.disk.DiskStorageFactory$DiskWriteTask.call(DiskStorageFactory.java:485)
at net.sf.ehcache.store.disk.DiskStorageFactory$PersistentDiskWriteTask.call(DiskStorageFactory.java:1088)
at net.sf.ehcache.store.disk.DiskStorageFactory$PersistentDiskWriteTask.call(DiskStorageFactory.java:1072)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
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:724)
I cannot for the life of me figure out why this is happening. I do not want my cache to touch the disk in any way. I also don't know why it is attempt to write things to /tmp when persistence is set to none.

facepalm
Seems I had a typo in the name. I had leadSourceCollectionsCache but it should have been leadSourceCollectionCache without the 's'.
My co-worker got the following extra output which I didn't get:
WARN-ConfigurationFactory: [No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/Users/foo/.m2/repository/net/sf/ehcache/ehcache-core/2.6.6/ehcache-core-2.6.6.jar!/ehcache-failsafe.xml]

Related

Jboss Https configuration with p7b certificate fails

We are implementing Http to Https conversion for our application, which uses Jboss as the application server. We made the following changes in the standalone.xml file.
<subsystem xmlns="urn:jboss:domain:web:1.1" native="false" default-virtual-server="default-host">
<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http" redirect-port="8443"/>
<connector name="https" protocol="HTTP/1.1" scheme="https" socket-binding="https" enable-lookups="false" secure="true">
<ssl name="ssl" key-alias="mykey" password="changeit" certificate-key-file="C:\Programs\Siemens\JBoss7.1.0\domain\configuration\winstore.jks" protocol="TLSv1" verify-client="false"/>
</connector>
<virtual-server name="default-host" enable-welcome-root="false">
<alias name="localhost"/>
<alias name="example.com"/>
</virtual-server>
</subsystem>
The keystore command lists the presence of the key as below:
[code=java]C:\Programs\Siemens\JBoss7.1.0\domain\configuration>keytool -list -keystore C:\Programs\Siemens\JBoss7.1.0\domain\configuration\winstore.jks
Enter keystore password:
Keystore type: JKS
Keystore provider: SUN
Your keystore contains 1 entry
mykey, Jun 23, 2017, trustedCertEntry,
Certificate fingerprint (SHA1): 8D:64:10:8B:F6:0D:1E:17:01:52:1C:97:8A:89:75:80:2D:2F:45:6B
We received the certificate from our certification team in p7b format, which we had to convert to CER format and then add it to keystore - winstore.jks which we are using in the path above. But with the above configurations in place, we are getting the below error while trying to restart jBoss.
11:46:19,692 ERROR [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-4) Error initializing endpoint: java.io.IOException: Alias name mykey does not identify a key entry
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.getKeyManagers(JSSESocketFactory.java:517) [jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.init(JSSESocketFactory.java:452) [jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.jsse.JSSESocketFactory.createSocket(JSSESocketFactory.java:168) [jbossweb-7.0.10.Final.jar:]
at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:977) [jbossweb-7.0.10.Final.jar:]
at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:190) [jbossweb-7.0.10.Final.jar:]
at org.apache.catalina.connector.Connector.init(Connector.java:983) [jbossweb-7.0.10.Final.jar:]
at org.jboss.as.web.WebConnectorService.start(WebConnectorService.java:267) [jboss-as-web-7.1.0.Final.jar:7.1.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_75]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_75]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_75]
Please let us know what could be the potential problem as these are our initial steps towards understanding Https.
Please note that if the certificate is a self signed one, the problem is not coming into picture.
Thanks,
Pavan.2

XmlRpcException during TeamCity build agent registration

I have installed the TeamCity build agent on my machine a few different ways- using Java Web Start and the manual .zip distribution. Both result in viable installations, as I have once or twice been able to connect and register properly with the TeamCity server. However, upon restarting (<install_location>/bin/agent.sh stop...<install_location>/bin/agent.sh start) I get the following error in teamcity-agent.log (with extra debugging turned on in the log4j config file).
[2013-04-03 09:05:09,870] DEBUG - jetbrains.buildServer.XMLRPC - faultStringjava.lang.RuntimeException: org.jdom.input.JDOMParseException: Error on line 28: XML document structures must start and end within the same entity.faultCode0
[2013-04-03 09:05:09,878] DEBUG - buildServer.AGENT.registration - jetbrains.buildServer.xmlrpc.RemoteCallException: Call http://teamcityserver:8080/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: org.jdom.input.JDOMParseException: Error on line 28: XML document structures must start and end within the same entity.
jetbrains.buildServer.xmlrpc.RemoteCallException: Call http://teamcityserver:8080/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: org.jdom.input.JDOMParseException: Error on line 28: XML document structures must start and end within the same entity.
at jetbrains.buildServer.xmlrpc.AbstractXmlRpcTarget.call(AbstractXmlRpcTarget.java:94)
at jetbrains.buildServer.agent.impl.ServerXmlRpcProxy.registerAgent3(ServerXmlRpcProxy.java:62)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doRegisterOnBuildServer(BuildAgentImpl.java:776)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.registerOnBuildServer(BuildAgentImpl.java:748)
at jetbrains.buildServer.agent.impl.ServerMonitor.run(ServerMonitor.java:71)
Caused by: org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: org.jdom.input.JDOMParseException: Error on line 28: XML document structures must start and end within the same entity.
at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeException(XmlRpcClientResponseProcessor.java:104)
at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse(XmlRpcClientResponseProcessor.java:71)
at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:73)
at org.apache.xmlrpc.TCXmlRpcClient$1.execute(TCXmlRpcClient.java:89)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185)
at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178)
at jetbrains.buildServer.xmlrpc.impl.CommonsXmlRpcTargetImpl$1.execute(CommonsXmlRpcTargetImpl.java:72)
at jetbrains.buildServer.xmlrpc.AbstractXmlRpcTarget.call(AbstractXmlRpcTarget.java:84)
... 4 more
[2013-04-03 09:05:09,878] WARN - buildServer.AGENT.registration - Call http://teamcityserver:8080/RPC2 buildServer.registerAgent3: org.apache.xmlrpc.XmlRpcException: java.lang.RuntimeException: org.jdom.input.JDOMParseException: Error on line 28: XML document structures must start and end within the same entity.
[2013-04-03 09:05:09,878] WARN - buildServer.AGENT.registration - Connection to TeamCity server is probably lost. Will be trying to restore it. Take a look at logs/teamcity-agent.log for details (unless you're using custom logging).
This is the xml in question according to the logs with extra xmlrpc debugging:
<?xml version="1.0"?><methodCall><methodName>buildServer.registerAgent3</methodName><params><param><value><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
<agentDetails agentName="aaronhbox_0" agentPort="9090" authToken="" osName="Linux, version 3.5.0-17-generic">
<alternativeAddresses>
<address>10.2.1.232</address>
<address>192.168.225.1</address>
<address>192.168.80.1</address>
</alternativeAddresses>
<availableRunners>
<runner runType="Ant" />
<runner runType="Duplicator" />
<runner runType="gradle-runner" />
<runner runType="Inspection" />
<runner runType="Ipr" />
<runner runType="JPS" />
<runner runType="Maven2" />
<runner runType="rake-runner" />
<runner runType="simpleRunner" />
</availableRunners>
<availableVcs>
<vcs name="perforce" />
<vcs name="mercurial" />
<vcs name="jetbrains.git" />
<vcs name="svn" />
<vcs name="cvs" />
</availableVcs>
<buildParameters>
<param name="env.COLORTERM" value="gnome-terminal" />
<param name="env.COMP_WORDBREAKS"><![CDATA["'><;|]]></value></param></params></methodCall>
Only once have I been able to restart the agent and have it connect again properly. Generally, I can install it, have it run once, then restarting it gives this error. Any ideas?
It looks like the formatting of the COMP_WORDBREAKS environment variable was messing with the xml structure and not allowing the complete generation of the xml request message.
The COMP_WORDBREAKS value on my machine is "'><;|&(:.
Placing the following line in the buildAgent.properties file fixed this problem and allows the agent to properly register.
env.COMP_WORDBREAKS=
I don't see any side-effects yet of making this change; the agent now seems to behave properly.

Tomcat 6/7 JNDI with multiple datasources

When there are more than one <Resource> elements in context.xml and more than one <resource-ref> elements in web.xml, my application begins to throw
TNS:no appropriate service handler found
and
ORA-01017: invalid username/password; logon denied
However, if there is only one of the data sources in JNDI, meaning the other one use regular JDBC data source, the application runs like a charm
Both data sources come from same db URL but use different schema.
My guess is that it may be caused by the same database URL of each resources with different username/password(schema). But tomcat should be capable of handling such situation, so my reasoning is that there maybe some configuration I missed?
Another interesting finding is:
When I use jdbc url jdbc:oracle:thin:#myhost:1521:orcl with SQL Developer to setup a connection, sometimes it connects without issue, but sometimes it gets rejected with the same issue: appropriate service handler found while this web application is active at the same time. However, the same JDBC URL works fine with another Spring application with regular JDBC connection(not JNDI). So what is the trick?
Here are the details of current config:
In Context.xml
<Resource name="jdbc/app_A" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:#myhost:1521:orcl"
username="usernameA" password="passwordA" maxActive="20" maxIdle="10" maxWait="-1" />
<Resource name="jdbc/app_B" auth="Container" type="javax.sql.DataSource"
driverClassName="oracle.jdbc.driver.OracleDriver" url="jdbc:oracle:thin:#myhost:1521:orcl"
username="usernameB" password="usernameB" maxActive="20" maxIdle="10" maxWait="-1" />
In Web.xml of the application:
<resource-ref>
<description>Oracle Datasource for app_A</description>
<res-ref-name>jdbc/app_A</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<resource-ref>
<description>Oracle Datasource for app_B</description>
<res-ref-name>jdbc/app_B</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
In ApplicationContext.xml
<jee:jndi-lookup id="dataSource1" jndi-name="java:comp/env/jdbc/app_A" resource-ref="true" />
<jee:jndi-lookup id="dataSource2" jndi-name="java:comp/env/jdbc/app_B" resource-ref="true" />
And finally I get exception piled up like this:
Jan 31, 2013 3:36:55 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: ORA-01017: invalid username/password; logon denied
Jan 31, 2013 3:36:56 PM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:412)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:531)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:221)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:503)
at org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:278)
at org.apache.tomcat.jdbc.pool.PooledConnection.connect(PooledConnection.java:182)
at org.apache.tomcat.jdbc.pool.ConnectionPool.createConnection(ConnectionPool.java:699)
at org.apache.tomcat.jdbc.pool.ConnectionPool.borrowConnection(ConnectionPool.java:631)
at org.apache.tomcat.jdbc.pool.ConnectionPool.init(ConnectionPool.java:485)
at org.apache.tomcat.jdbc.pool.ConnectionPool.<init>(ConnectionPool.java:143)
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:539)
at org.apache.tomcat.jdbc.pool.DataSourceFactory.getObjectInstance(DataSourceFactory.java:237)
at org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:143)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
at org.apache.naming.NamingContext.lookup(NamingContext.java:843)
at org.apache.naming.NamingContext.lookup(NamingContext.java:154)
at org.apache.naming.NamingContext.lookup(NamingContext.java:831)
at org.apache.naming.NamingContext.lookup(NamingContext.java:168)
at org.apache.catalina.core.NamingContextListener.addResource(NamingContextListener.java:1061)
at org.apache.catalina.core.NamingContextListener.createNamingContext(NamingContextListener.java:671)
at org.apache.catalina.core.NamingContextListener.lifecycleEvent(NamingContextListener.java:270)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
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:618)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: oracle.net.ns.NetException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
at oracle.net.ns.NSProtocol.connect(NSProtocol.java:385)
at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1042)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:301)
... 38 more
Jan 31, 2013 3:36:56 PM org.apache.catalina.core.NamingContextListener addResource
WARNING: Failed to register in JMX: javax.naming.NamingException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
Jan 31, 2013 3:36:56 PM org.apache.naming.NamingContext lookup
WARNING: Unexpected exception resolving reference
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12519, TNS:no appropriate service handler found
Really not sure why the no appropriate service handler found error pops up, it seems the connection is not accepted/understood by orcl Listener.
Here is what I insert into persisntence.xml
<persistence-unit name="persistenceUnit1">
....
<jta-data-source>jdbc/app_A</jta-data-source>
....
</persistence-unit>
<persistence-unit name="persistenceUnit2">
....
<jta-data-source>jdbc/app_B</jta-data-source>
....
</persistence-unit>
ORA-12519, TNS:no appropriate service handler found error might be the result of using an old-style JDBC connection string. According to chapter 8 Data Sources and URLs of Oracle 11.1 JDBC Developer's Guide and Reference, connection string format is following:
jdbc:oracle:thin:#//host_name:port_number/service_name
There's also a note saying "Starting Oracle Database 10g, Oracle Service IDs are not supported". So the syntax you're using must have been suitable for Oracle 9i. It might work on newer versions, but that's not guaranteed.
So consider changing the format of your JDBC connection strings to follow the format suggested in the guide.
Also, for Oracle 9i onwards you should use oracle.jdbc.OracleDriver rather than oracle.jdbc.driver.OracleDriver as Oracle have stated that oracle.jdbc.driver.OracleDriver is deprecated and support for this driver class will be discontinued.

Web-console Exception: No broker is found at any of the 1 configured urls

I'm trying to start the web-console in tomee+ 1.5.0, like it is shown here:
http://activemq.apache.org/web-console.html (Example configuration using Tomcat)
I use the following parameter when starting the server:
-Dcatalina.base="D:\Kit\apache-tomee-plus-1.5.0" -Dcatalina.home="D:\Kit\apache-tomee-plus-1.5.0" -Dwtp.deploy="D:\Kit\apache-tomee-plus-1.5.0\wtpwebapps" -Djava.endorsed.dirs="D:\Kit\apache-tomee-plus-1.5.0\endorsed" -Dwebconsole.type=properties -Dwebconsole.jms.url=tcp://localhost:61616 -Dwebconsole.jmx.url=service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi -Dwebconsole.jmx.user=tomee -Dwebconsole.jmx.password=tomee -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.port=1099
I can connect with jconsole to service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi but I don't see the "org.apache.activemq" in MBeans. When I try to access the web-console at
http://localhost:8080/activemq-web-console-5.7.0/
I keep getting the following exception:
Caused by: java.lang.IllegalStateException: No broker is found at any of the 1 configured urls
at org.apache.activemq.web.RemoteJMXBrokerFacade.createConnection(RemoteJMXBrokerFacade.java:168)
This is the broker in the activemq.xml file of the web-console war:
<broker brokerName="web-console" useJmx="true" xmlns="http://activemq.apache.org/schema/core">
<persistenceAdapter>
<kahaDB directory="${activemq.data}/kahadb"/>
</persistenceAdapter>
<transportConnectors>
<transportConnector name="openwire" uri="tcp://localhost:61616"/>
<transportConnector name="stomp" uri="stomp://localhost:61613"/>
</transportConnectors> </broker>
Can someone give me a hint regarding this problem?
The problem is related to the "Datasource" parameter from ActiveMQResourceAdapter. This version works:
<Resource id="JMSAdapter" type="ActiveMQResourceAdapter">
BrokerXmlConfig = broker:(tcp://localhost:61616)?persistent=false&useJmx=true
ServerUrl = tcp://localhost:61616
Datasource =
</Resource>
This is related to the following: https://issues.apache.org/jira/browse/TOMEE-474

Content deployer error when publishing to Oracle broker db

I'm getting an error when trying to deploy content to an oracle broker database (I'm running Tridion 2011 sp1). I've had a search on the SDL Tridion forum and cannot find anyone that's had the same issue.
The error message in the cme is:
Committing Deployment Failed
Phase: Deployment Prepare Commit Phase failed, Unable to prepare transaction: tcm:0-55-66560,
org.hibernate.exception.SQLGrammarException: could not execute query,
org.hibernate.exception.SQLGrammarException: could not execute query, Unable to prepare transaction:
tcm:0-55-66560, org.hibernate.exception.SQLGrammarException: could not execute query,
org.hibernate.exception.SQLGrammarException: could not execute query
And in the deployer logs i get the following:
2012-02-24 15:07:27,866 WARN DeployPipelineExecutor - Phase: Deployment Prepare Commit Phase failure message: Unable to prepare transaction: tcm:0-55-66560, org.hibernate.exception.SQLGrammarException: could not execute query, org.hibernate.exception.SQLGrammarException: could not execute query for transaction: tcm:0-55-66560
2012-02-24 15:07:27,866 DEBUG DeployPipelineExecutor - Failure in Phase: Deployment Prepare Commit Phase attempt: 11 for transaction: tcm:0-55-66560
2012-02-24 15:07:27,866 ERROR DeployPipelineExecutor - Final attempt in Phase: Deployment Prepare Commit Phase failed for transaction: tcm:0-55-66560
2012-02-24 15:07:27,875 ERROR DeployPipelineExecutor - Original stacktrace for transaction: tcm:0-55-66560
com.tridion.deployer.ProcessingException: Unable to prepare transaction: tcm:0-55-66560, org.hibernate.exception.SQLGrammarException: could not execute query, org.hibernate.exception.SQLGrammarException: could not execute query
at com.tridion.deployer.phases.PreCommitPhase.handleFailure(PreCommitPhase.java:120) ~[cd_deployer.jar:na]
at com.tridion.deployer.phases.PreCommitPhase.execute(PreCommitPhase.java:101) ~[cd_deployer.jar:na]
at com.tridion.deployer.phases.DeployPipelineExecutor.runMainExecutePhase(DeployPipelineExecutor.java:186) [cd_deployer.jar:na]
at com.tridion.deployer.phases.DeployPipelineExecutor.doExecute(DeployPipelineExecutor.java:97) [cd_deployer.jar:na]
at com.tridion.deployer.phases.DeployPipelineExecutor.execute(DeployPipelineExecutor.java:61) [cd_deployer.jar:na]
at com.tridion.deployer.TransactionManager.handleDeployPackage(TransactionManager.java:80) [cd_deployer.jar:na]
at com.tridion.deployer.queue.QueueLocationHandler$1.run(QueueLocationHandler.java:176) [cd_deployer.jar:na]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:417) [na:1.5.0_11]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269) [na:1.5.0_11]
at java.util.concurrent.FutureTask.run(FutureTask.java:123) [na:1.5.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) [na:1.5.0_11]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) [na:1.5.0_11]
at java.lang.Thread.run(Thread.java:595) [na:1.5.0_11]
2012-02-24 15:07:27,875 INFO TransactionPersistence - Removing deployment transaction information: tcm:0-55-66560
2012-02-24 15:07:27,876 ERROR DeployPipelineExecutor - Unable to start processing deployment package with transactionId: tcm:0-55-66560
2012-02-24 15:07:27,880 DEBUG DeployPipelineExecutor - Checking if transaction is completed: tcm:0-55-66560 is true
2012-02-24 15:07:27,880 INFO DeployPipelineExecutor - Transaction is completed: tcm:0-55-66560
2012-02-24 15:07:27,882 INFO DeployPipelineExecutor - Finished executing deployment pipeline for: tcm:0-55-66560 in 2274 ms.
EDIT:
Here is the node from the cd_storage_conf.xml file:
<Storages>
<Storage Type="persistence" Id="ddeploy" dialect="ORACLESQL" Class="com.tridion.storage.persistence.JPADAOFactory">
<Pool Type="jdbc" Size="5" MonitorInterval="60" IdleTimeout="120" CheckoutTimeout="120" />
<DataSource Class="oracle.jdbc.pool.OracleDataSource">
<Property Name="driverType" Value="thin"/>
<Property Name="networkProtocol" Value="tcp"/>
<Property Name="serverName" Value="secret"/>
<Property Name="portNumber" Value="1526"/>
<Property Name="databaseName" Value="secret"/>
<Property Name="user" Value="secret"/>
<Property Name="password" Value="secret"/>
</DataSource>
</Storage>
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultFile" defaultFilesystem="false">
<Root Path="/htdocs/en_US/" />
</Storage>
<Storage Type="filesystem" Class="com.tridion.storage.filesystem.FSDAOFactory" Id="defaultDataFile" defaultFilesystem="true" defaultStorage="true">
<Root Path="/htdocs/en_US/data" />
</Storage>
</Storages>
And the item types
<ItemTypes defaultStorageId="ddeploy" cached="false">
<Item typeMapping="Page" cached="false" storageId="defaultFile"/>
<Item typeMapping="Binary" cached="false" storageId="defaultFile"/>
</ItemTypes>
Any help would be greatly appreciated.
Doh! - I can confirm the issue here was that the oracle database user did not have access to the correct schema.
Still if anyone searches here for the same issue, they'll know the correct place to look :)
The error message indicates that the SQL query generated by hibernate doesn't execute properly on your database. Can you double check your storage config (perhaps post the <Storage/> element here. In particular, can you check that the dialect attribute is correct.

Resources