java.lang.SecurityException when executing IBM Websphere runmqckm command - java

I'm trying to setup ssl for IBM MQ server and when I executed the command
runmqckm -keydb -create -db keydb.kdb -pw password -type cms -expire 1500 -stash
as one of the steps, it fails with the following exception.
Exception in thread "main" java.lang.ExceptionInInitializerError
at java.lang.J9VMInternals.ensureError(J9VMInternals.java:186)
at java.lang.J9VMInternals.recordInitializationFailure(J9VMInternals.java:175)
at javax.crypto.Mac.getInstance(Unknown Source)
at com.ibm.security.cmskeystore.FileHeaderHashGeneratorFactory$FileHeaderHashGeneratorV4Impl.generateHash(FileHeaderHashGeneratorFactory.java:145)
at com.ibm.security.cmskeystore.CMSKeyStoreSpi.engineLoad(CMSKeyStoreSpi.java:1206)
at java.security.KeyStore.load(KeyStore.java:1226)
at com.ibm.gsk.ikeyman.keystore.KeyStoreProxyCreatorFactory$FileKeyStoreProxy.performLoad(KeyStoreProxyCreatorFactory.java:304)
at com.ibm.gsk.ikeyman.keystore.KeyStoreProxyCreatorFactory$CMSKeyStoreProxy.performLoad(KeyStoreProxyCreatorFactory.java:437)
at com.ibm.gsk.ikeyman.keystore.KeyStoreProxyCreatorFactory$FileKeyStoreProxy.load(KeyStoreProxyCreatorFactory.java:253)
at com.ibm.gsk.ikeyman.keystore.KeyStoreProxyCreatorFactory$AbstractKeyStoreProxy.getKeyStore(KeyStoreProxyCreatorFactory.java:193)
at com.ibm.gsk.ikeyman.keystore.KeyStoreItemFactory.getCMSKeyStoreItem(KeyStoreItemFactory.java:323)
at com.ibm.gsk.ikeyman.keystore.KeyStoreItemFactory.newCMSKeyStoreItem(KeyStoreItemFactory.java:294)
at com.ibm.gsk.ikeyman.keystore.KeyStoreItemFactory.createKeyStore(KeyStoreItemFactory.java:115)
at com.ibm.gsk.ikeyman.command.CommandFactory$CreateDbCommand.run(CommandFactory.java:402)
at com.ibm.gsk.ikeyman.command.Command.invoke(Command.java:203)
at com.ibm.gsk.ikeyman.ikeycmd.main(ikeycmd.java:62)
Caused by: java.lang.SecurityException: Cannot set up certs for trusted CAs
at javax.crypto.b.<clinit>(Unknown Source)
... 14 more
Caused by: java.lang.SecurityException: Jurisdiction policy files are not signed by trusted signers!
at javax.crypto.b.a(Unknown Source)
at javax.crypto.b.c(Unknown Source)
at javax.crypto.b.access$600(Unknown Source)
at javax.crypto.b$0.run(Unknown Source)
at java.security.AccessController.doPrivileged(AccessController.java:333)
... 15 more
My Websphere and Java version information are as below
Websphere
Name: WebSphere MQ
Version: 8.0.0.2
Level: p800-002-150519.TRIAL
BuildType: IKAP - (Production)
Platform: WebSphere MQ for Linux (x86-64 platform)
Mode: 64-bit
O/S: Linux 2.6.32-504.el6.x86_64
InstName: Installation1
InstDesc:
Primary: Yes
InstPath: /opt/mqm
DataPath: /var/mqm
MaxCmdLevel: 801
LicenseType: Production
Java
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
Can anyone please help me to resolve this issue?

I figured the solution myself and posting it below for the future reference of other.
Download IBM Unrestricted SDK JCE policy files from https://www-01.ibm.com/marketing/iwm/iwm/web/preLogin.do?source=jcesdk.
Copy both local_policy.jar and US_export_policy.jar files to <mq_installation_path>/java/jre64/jre/lib/security folder.
Give ownership and executable permission of both files to mqm user.

Related

Java Mission Control 7 running on Java 11 cannot connect to Wildfly with "jmx:remoting-jmx" protocol

As far as I can tell, I am having the same issue described here:
https://developer.jboss.org/thread/278895
(That forum is closed and no additional comments are allowed, their recommendation is to post to SO)
I am trying to run JMC 7.1.2 on OpenJDK 64-Bit Server VM Corretto-11.0.8.10.1 (build 11.0.8+10-LTS, mixed mode) on my workstation and connect to a remote Wildfly server using the "jmx:remoting-jmx" protocol. This worked for years, but AFAICT does not work in the constellation Java-11 and JMC7.
There is no error about unknown protocol or similar
(Yes, I have already read and followed instructions in:
Connect Java Mission Control to Wildfly 16), but I get this error when connecting:
org.openjdk.jmc.rjmx.ConnectionException caused by javax.security.sasl.SaslException: org/ietf/jgss/GSSManager [Caused by java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager]
at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:441)
at org.openjdk.jmc.rjmx.internal.ServerHandle.doConnect(ServerHandle.java:116)
at org.openjdk.jmc.rjmx.internal.ServerHandle.connect(ServerHandle.java:106)
at org.openjdk.jmc.console.ui.editor.internal.ConsoleEditor$ConnectJob.run(ConsoleEditor.java:99)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: javax.security.sasl.SaslException: org/ietf/jgss/GSSManager [Caused by java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager]
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:426)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:242)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
at ...asynchronous invocation...(Unknown Source)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:599)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:561)
at org.jboss.remoting3.EndpointImpl.connect(EndpointImpl.java:549)
at org.jboss.remotingjmx.RemotingConnector.internalRemotingConnect(RemotingConnector.java:268)
at org.jboss.remotingjmx.RemotingConnector.internalConnect(RemotingConnector.java:156)
at org.jboss.remotingjmx.RemotingConnector.connect(RemotingConnector.java:103)
at org.openjdk.jmc.rjmx.internal.RJMXConnection.connectJmxConnector(RJMXConnection.java:487)
at org.openjdk.jmc.rjmx.internal.RJMXConnection.establishConnection(RJMXConnection.java:464)
at org.openjdk.jmc.rjmx.internal.RJMXConnection.connect(RJMXConnection.java:434)
... 4 more
Caused by: java.lang.NoClassDefFoundError: org/ietf/jgss/GSSManager
at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3137)
at java.base/java.lang.Class.getConstructor0(Class.java:3342)
at java.base/java.lang.Class.getConstructor(Class.java:2151)
at java.base/java.security.Provider.newInstanceUtil(Provider.java:153)
at java.base/java.security.Provider$Service.newInstance(Provider.java:1891)
at org.wildfly.security.WildFlyElytronBaseProvider$ProviderService.newInstance(WildFlyElytronBaseProvider.java:218)
at org.wildfly.security.sasl.util.SecurityProviderSaslClientFactory.createSaslClient(SecurityProviderSaslClientFactory.java:94)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.ProtocolSaslClientFactory.createSaslClient(ProtocolSaslClientFactory.java:50)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.ServerNameSaslClientFactory.createSaslClient(ServerNameSaslClientFactory.java:50)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.ServerNameSaslClientFactory.createSaslClient(ServerNameSaslClientFactory.java:50)
at org.wildfly.security.sasl.util.FilterMechanismSaslClientFactory.createSaslClient(FilterMechanismSaslClientFactory.java:102)
at org.wildfly.security.sasl.util.AbstractDelegatingSaslClientFactory.createSaslClient(AbstractDelegatingSaslClientFactory.java:66)
at org.wildfly.security.sasl.util.LocalPrincipalSaslClientFactory.createSaslClient(LocalPrincipalSaslClientFactory.java:76)
at org.wildfly.security.sasl.util.PrivilegedSaslClientFactory.lambda$createSaslClient$0(PrivilegedSaslClientFactory.java:64)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at org.wildfly.security.sasl.util.PrivilegedSaslClientFactory.createSaslClient(PrivilegedSaslClientFactory.java:64)
at org.wildfly.security.auth.client.AuthenticationConfiguration.createSaslClient(AuthenticationConfiguration.java:1496)
at org.wildfly.security.auth.client.AuthenticationContextConfigurationClient.createSaslClient(AuthenticationContextConfigurationClient.java:408)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:420)
at org.jboss.remoting3.remote.ClientConnectionOpenListener$Capabilities.handleEvent(ClientConnectionOpenListener.java:242)
at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92)
at org.xnio.conduits.ReadReadyHandler$ChannelListenerHandler.readReady(ReadReadyHandler.java:66)
at org.xnio.nio.NioSocketConduit.handleReady(NioSocketConduit.java:89)
at org.xnio.nio.WorkerThread.run(WorkerThread.java:591)
If I use OpenJDK 8 with JMC 7 then it works (that is, I can connect and also read jfr files created with jdk11) but is that really the only way to get this configuration to work?

Classpath set, but: java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver

Okay, I'm confused. My SQL Server JAR is here:
Volume in drive C has no label.
Volume Serial Number is 8008-2D93
Directory of c:\temp
03/07/2014 09:38 AM <DIR> .
03/07/2014 09:38 AM <DIR> ..
03/05/2014 10:34 PM 222,417 output.exd
02/17/2012 02:45 PM 563,117 sqljdbc.jar
02/17/2012 02:45 PM 584,207 sqljdbc4.jar
3 File(s) 1,369,741 bytes
2 Dir(s) 21,865,553,920 bytes free
My Classpath is set:
C:\WINDOWS\system32>echo %CLASSPATH%
.;C:\Program Files (x86)\Java\jre7\lib\ext\QTJava.zip;c:\temp\sqljdbc4.jar
Its a JDBC 4.0 driver, so I shouldn't need to do this, but I've tried setting the class name.
Properties connectionProps = new Properties();
connectionProps.put("user", this.jdbcUser);
connectionProps.put("password", this.jdbcPass);
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
conn = DriverManager.getConnection(this.jdbcUrl, connectionProps);
Still I execute my program and I'm getting the error:
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
C:\WINDOWS\system32>java -jar "C:\Users\MYUSER\Documents\NetBeansProjects\myappSource\dist\myappSource.jar" -u MYUSER -p MYPASS -j "jdbc:sqlserver://127.0.0.1\\msqlserver:1433;database=MYDB"
Mar 07, 2014 9:49:54 AM filters.myapp.dao.db.DbSwitcher getDatabaseForUrl
SEVERE: jdbc:sqlserver://127.0.0.1\\msqlserver:1433;database=MYDB
Mar 07, 2014 9:49:54 AM filters.myapp.dao.db.Database connect
SEVERE: null
java.lang.ClassNotFoundException: com.microsoft.sqlserver.jdbc.SQLServerDriver
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at filters.myapp.dao.db.Database.connect(Database.java:217)
at filters.myapp.dao.db.Database.<init>(Database.java:38)
at filters.myapp.dao.db.MssqlDb.<init>(MssqlDb.java:15)
at filters.myapp.dao.db.DbSwitcher.getDatabaseForUrl(DbSwitcher.java:14)
at filters.myapp.UserInterface.cli(UserInterface.java:76)
at filters.myapp.UserInterface.<init>(UserInterface.java:34)
at filters.myapp.UserInterface.main(UserInterface.java:46)
In case it matters, I'm running Windows 8.1. I've tried the command prompt both as an admin and as not.
Java info:
C:\WINDOWS\system32>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
Any ideas?
SQL Server is SQL Server Express 2012.
If you pass -jar to java.exe then the classpath is taken from the specified Jar file's manifest; all external classpath settings (e.g. %CLASSPATH%) are ignored.
Do one of:
Use java -cp ...\myapp.jar MainClassName
Put sqljdbc.jar into the Class-Path field in myapp.jar's manifest.
Discover and load sqljdbc.jar programmatically.
copy sqljdbc4.jar under WebContent-->WEB_INF -->lib folder.
This resolved my problem.
set the class path for sqljdbc4.jar
CLASSPATH= D:\sqljdbc_4.0.2206.100_enu\sqljdbc_4.0\enu\sqljdbc4.jar;
if you are eclipse user remove unnecessary .jar file sqljdbc
If you programme application ZK, then put sqljdbc4.jar in the folder WebContent -> WEB_INF -> lib .
Reference:
Anand's comment.
Open a new command prompt, and try with steps as below, its not good to work inside C:\WINDOWS\system32
The issue says the sqljdbc4.jar is not properly set in the classpath.
C:\Test
set classpath=%classpath%;.;c:\temp\sqljdbc4.jar
java -jar "C:\Users\MYUSER\Documents\NetBeansProjects\myappSource\dist\myappSource.jar" -u MYUSER -p MYPASS -j "jdbc:sqlserver://127.0.0.1\\msqlserver:1433;database=MYDB"
I got this error after updating my Eclipse STS, it turned out my server forgot all of its configuration info during the update. I had to set up the server's classpath and environment variables all over again and that fixed the issue.

Why RMI registry is ignoring the java.rmi.server.codebase property

I am running a Hello World example for java RMI
1) I run the registry in an empty folder
motta#motta-laptop ~/tmp $ rmiregistry
2) I start the HTTP server to retrieve the classes at runtime. The download folder contains the remote interface for the client-server
motta#motta-laptop ~/download $ java NanoHTTPD 8080
3) I start the server passing the java.rmi.server.codebase property as suggested in the java RMI tutorial
motta#motta-laptop ~/server $ java -Djava.rmi.server.codebase="http://localhost:8080" WarehouseServer
The RMI registry is not contacting the HTTP server and is throwing an exception (see details after the question).
But if I do the following
1) Start the rmi registry with the java.rmi.server.codebase property
motta#motta-laptop ~/tmp $ rmiregistry -J-Djava.rmi.server.codebase="http://localhost:8080/"
2) Start the HTTP server as before
3) Start the server without any option
motta#motta-laptop ~/server $ java WarehouseServer
it works, but why? It seems that with the first procedure the RMI registry is ignoring the java.rmi.server.codebase property
Thank you
=================================
I am running
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)
The exception from the RMI registry
Constructing server implementation...
Binding server implementation to registry...
Exception in thread "main" java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Warehouse
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:419)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
at sun.rmi.transport.Transport$1.run(Transport.java:177)
at sun.rmi.transport.Transport$1.run(Transport.java:174)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
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:722)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377)
at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
at WarehouseServer.main(WarehouseServer.java:14)
It seems that with the first procedure the RMI registry is ignoring
the java.rmi.server.codebase property.
That's correct. The reason is that, as of JDK 7u21, the java.rmi.server.useCodebaseOnly property is true by default, whereas in prior releases it was false by default.
When useCodebaseOnly is false, the RMI Registry (and RMI clients) use the codebase that has been passed to them from the server. Now that the default value is true the registry and clients ignore the server's codebase property. The registry and clients must either set their own codebase property to match that of the server, or (not recommended) they could set useCodebaseOnly back to false. See RMI Enhancements in JDK 7 for further details.
The RMI Tutorial hasn't been updated to reflect this change. Sorry about that. I'll make sure it gets updated.

Trouble Deploying App From Tomcat to Sun Java Web Server 7...and I'm a .NET guy :(

I am trying to deploy an application that was developed in MyEclipse using Tomcat (originally 5.5 but works with 7) to our demo server (Sun Java Web Server 7). Unfortunately all of the people that had designed the application have left the company. So, here is what I know:
1) The application works as-is in MyEclipse on Tomcat
2) The application was successfully deployed to Sun Java Web Server in the past (presumably with the same build)
3) I can connect to the database from the server with sqldeveloper
4) The application uses: Java EE 5 and Spring framework
Application settings:
driver: oracle.jdbc.driver.OracleDriver
url jdbc:oracle:thin#xx.xx.x.xx:service
Here is the only error I am getting. I get a lot of warnings before and after though:
warning: CORE3283: stderr: com.mchange.v2.async.ThreadPoolAsynchronousRunner$PoolThread.run(ThreadPoolAsynchronousRunner.java:547)
failure:
for host xx.xx.x.xxx trying to GET /application/login.jsp, service-j2ee reports: com.mchange.v2.resourcepool.CannotAcquireResourceException: A ResourcePool could not acquire a resource from its primary factory or source. at
com.mchange.v2.resourcepool.BasicResourcePool.awaitAvailable(BasicResourcePool.java:1319) at
com.mchange.v2.resourcepool.BasicResourcePool.prelimCheckoutResource(BasicResourcePool.java:557) at
com.mchange.v2.resourcepool.BasicResourcePool.checkoutResource(BasicResourcePool.java:477) at
com.mchange.v2.c3p0.impl.C3P0PooledConnectionPool.checkoutPooledConnection(C3P0PooledConnectionPool.java:525) at
com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource.getConnection(AbstractPoolBackedDataSource.java:128) at
org.springframework.jdbc.datasource.DataSourceUtils.doGetConnection(DataSourceUtils.java:113) at
org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:79) at
org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:379) at
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:455) at
org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:463) at
org.springframework.jdbc.core.simple.SimpleJdbcTemplate.query(SimpleJdbcTemplate.java:187) at
gov.nyc.oer.dao.SiteConfigDao.getSiteConfig(Unknown Source) at
gov.nyc.oer.manager.SiteConfigManager.getSiteConfig(Unknown Source) at
gov.nyc.oer.manager.SiteConfigManager.afterPropertiesSet(Unknown Source) at
gov.nyc.oer.manager.SiteConfigManager.getValue(Unknown Source) at
org.apache.jsp.login_jsp._jspService(login_jsp.java:67) at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:80) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917) at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373) at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:457) at
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:351) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:917) at
org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:169) at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:183) at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:138) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:217) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:187) at
org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586) at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556) at
com.sun.webserver.connector.nsapi.NSAPIProcessor.service(NSAPIProcessor.java:160)
Server Configuration:
Java: Enabled
Java Home: ${WS_JDK_HOME}
Ignore Environment Class Path: Enabled
Class Path Prefix: None
Server Class Path:
${WS_INSTALL_ROOT}/lib/webserv-rt.jar
${WS_INSTALL_ROOT}/lib/pwc.jar
${WS_INSTALL_ROOT}/lib/ant.jar
${java.home}/lib/tools.jar
${WS_INSTALL_ROOT}/lib/ktsearch.jar
${WS_INSTALL_ROOT}/lib/webserv-jstl.jar
${WS_INSTALL_ROOT}/lib/jsf-impl.jar
${WS_INSTALL_ROOT}/lib/jsf-api.jar
${WS_INSTALL_ROOT}/lib/webserv-jwsdp.jar
${WS_INSTALL_ROOT}/lib/container-auth.jar
${WS_INSTALL_ROOT}/lib/mail.jar
${WS_INSTALL_ROOT}/lib/activation.jar
Class Path Suffix: ${WS_INSTALL_ROOT}/lib/ojdbc14.jar
JVM Options:
-Djava.security.auth.login.config=login.conf
-Xms128m -Xmx256m
-Djdbc.drivers=oracle.jdbc.driver.OracleDriver
Looks like your database connection is not defined on your sun java web server 7. On this website you can find out how to define it.

Yet Another Java Service Wrapper on Debian

I had problems with Yajsw installing a service in Debian I was trying to run a java app called Test.jar, so I have
Executed ps –af command to obtain its PID,
Run GenConfig.sh to generate wrapper.conf setting /path/GenConfig.sh [PID], all was ok.!
But when I tried to install it as a Daemon I run /path/installDaemon.sh it thrown me these errors, and doesn’t install it as Daemon.
-
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
Dec 2, 2011 11:45:36 AM org.apache.commons.vfs.VfsLog info
INFO: Using "/tmp/vfs_cache" as temporary files store.
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.rzo.yajsw.boot.WrapperExeBooter.main(WrapperExeBooter.java:43)
Caused by: groovy.lang.MissingPropertyException: No such property: if (new File('/etc/rc0.d').exists()) return '/etc/rcX.d' else
return '/etc/init.d/rcX.d' for class: org.apache.commons.configuration.ConfigurationBinding at groovy.lang.Binding.getVariable(Binding.java:57)
at org.apache.commons.configuration.ConfigurationBinding.getVariable(ConfigurationBinding.java:28)
at org.apache.commons.configuration.GInterpolator.evaluate(GInterpolator.java:84)
at org.apache.commons.configuration.GInterpolator.interpolate(GInterpolator.java:57)
at org.rzo.yajsw.config.YajswConfigurationImpl.resolveContainerStore(YajswConfigurationImpl.java:388)
at org.apache.commons.configuration.AbstractConfiguration.getString(AbstractConfiguration.java:1085)
at org.rzo.yajsw.os.posix.PosixService.init(PosixService.java:186)
at org.rzo.yajsw.wrapper.WrappedService.init(WrappedService.java:118)
at org.rzo.yajsw.WrapperExe.getService(WrapperExe.java:152)
at org.rzo.yajsw.WrapperExe.doInstall(WrapperExe.java:296)
at org.rzo.yajsw.WrapperExe.executeCommand(WrapperExe.java:215)
at org.rzo.yajsw.WrapperExe.main(WrapperExe.java:175)
... 5 more
Thanks a lot
Thomas

Categories