commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trags <Thomas.Rog...@oce.com>
Subject [daemon] Cannot instantiate class: com.sun.jndi.fscontext.RefFSContextFactory
Date Wed, 22 Sep 2010 15:31:15 GMT

I hope someone can help me with this.  I am a n00b with regards to the
Commons daemon, though I wrote a service years ago in c.
I'm running on Windows7, 64-bit.  I am registering my service with the amd64
version of prunsrv.exe, which I have copied/renamed to myapp.exe.  I can run
my app from a command line with...
java -Dfile.encoding=Cp1252 -cp MyApp.jar com.xxxx.MyApp
I have the following install service command:


myapp //IS//MyApp --DisplayName="MyApp Monitor" --Description="my app"
--Startup=manual ++DependsOn=MySQL --StartMode=jvm
--Jvm="%JAVA_HOME%\jre\bin\server\jvm.dll" --StartClass=com.xxx.MyApp
--Classpath="lib/SNMP4J.jar;lib/charsets.jar;lib/fscontext.jar;lib/jndi.jar;lib/providerutil.jar;lib/log4j-1.2.15.jar;lib/jdom.jar;lib/commons-dbcp-1.2.1.jar;lib/commons-dbutils-1.0.jar;lib/commons-lang-2.3.jar;lib/commons-pool-1.3.jar;lib/mysql-connector-java-5.0.4-bin.jar;./MyApp.jar;"
++JvmOptions="-Dfile.encoding=Cp1252" --StopTimeout=30 --LogLevel=Debug
--StartPath="C:\Users\Thomas\workspace\MyApp\dist"

It installs OK.  When I try to manually start my service, the application
launches.  I put a few diagnostics at the beginning of the app, and it
produces the following log:


2010-09-22 09:47:43,380 INFO   MyApp main -  Class Path:
lib/SNMP4J.jar;lib/charsets.jar;lib/fscontext.jar;lib/jndi.jar;lib/providerutil.jar;lib/log4j-1.2.15.jar;lib/jdom.jar;lib/commons-dbcp-1.2.1.jar;lib/commons-dbutils-1.0.jar;lib/commons-lang-2.3.jar;lib/commons-pool-1.3.jar;lib/mysql-connector-java-5.0.4-bin.jar;./MyApp.jar

2010-09-22 09:47:43,380 INFO   MyApp main -    Lib Path: C:\Program
Files\Apache-commons;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;c:\Program
Files (x86)\NVIDIA
Corporation\PhysX\Common;C:\Oracle\11.1.0\client_1;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
Files (x86)\Common Files\Acronis\SnapAPI\;C:\Program Files (x86)\Microsoft
SQL Server\90\Tools\binn\;C:\Program Files (x86)\MySQL\MySQL Server
5.1\bin;C:\Program Files\TortoiseSVN\bin;C:\Program
Files\SlikSvn\bin\;C:\oraclexe\app\oracle\product\10.2.0\server\bin

2010-09-22 09:47:43,380 INFO   MyApp main - Current Dir:
C:\Users\Thomas\workspace\MyApp\dist

2010-09-22 09:47:43,380 DEBUG  MyApp getProperty - Get Property
(key=PCM_POLLING_INTERVAL,value=2000)

2010-09-22 09:47:43,442 DEBUG  MyApp getProperty - Get Property
(key=INITIAL_CONTEXT_FACTORY,value=com.sun.jndi.fscontext.RefFSContextFactory)

2010-09-22 09:47:43,442 DEBUG  MyApp getProperty - Get Property
(key=PROVIDER_URL,value=file://C:/tmp)

2010-09-22 09:47:43,458 ERROR  PCM_DataConnection  - DataBase Initialization
Failed:  javax.naming.NoInitialContextException: Cannot instantiate class:
com.sun.jndi.fscontext.RefFSContextFactory [Root exception is
java.lang.ClassNotFoundException:
com/sun/jndi/fscontext/RefFSContextFactory]

Can anyone explain why the fscontext is incompatible?

Thanks,
Thomas
-- 
View this message in context: http://apache-commons.680414.n4.nabble.com/daemon-Cannot-instantiate-class-com-sun-jndi-fscontext-RefFSContextFactory-tp2550531p2550531.html
Sent from the Commons - User mailing list archive at Nabble.com.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message