|
From: Leif M. <lei...@ta...> - 2009-10-06 08:02:51
|
Andy, Sorry for the delay getting back to you. Yes that would do it. See the error message: java.lang.IllegalAccessException: Class org.tanukisoftware.wrapper.WrapperSimpleApp can not access a member of class xml2db.ExcelDataImporter with modifiers "public static" I will think about how to make the meaning of the error a bit clearer. Please let me know if oyu have any other questions. Cheers, Leif On Tue, Oct 6, 2009 at 4:38 PM, Andreas Karlsson <and...@ya...> wrote: > Hi again, > For the forums completeness. > I solved the problem. > The class was defined as just class myClass by changing to public class myClass the error is gone. > /Andy > > --- On Mon, 10/5/09, Andreas Karlsson <and...@ya...> wrote: > >> From: Andreas Karlsson <and...@ya...> >> Subject: [Wrapper-user] WrapperSimpleApp can not access a member of class myClass with modifiers "public static" >> To: wra...@li... >> Date: Monday, October 5, 2009, 8:26 PM >> Hi guys, >> I'm trying to launch a small application as a windows >> service. >> The java program runs fine as a stand-alone but I get an >> error complaining about not finding the main-method when >> trying to launch it from the Wrapper. The main-method is in >> that file and I cannot see what the problem is. Can you? >> /Andy >> >> DEBUG | wrapper | 2009/10/05 15:12:08 | >> Allocating a console for the service. >> DEBUG | wrapper | 2009/10/05 15:12:08 | Found >> console window. >> STATUS | wrapper | 2009/10/05 15:12:08 | --> >> Wrapper Started as Service >> STATUS | wrapper | 2009/10/05 15:12:08 | Java Service >> Wrapper Community Edition 32-bit 3.3.6 >> STATUS | wrapper | 2009/10/05 15:12:08 >> | Copyright (C) 1999-2009 Tanuki Software, >> Ltd. All Rights Reserved. >> STATUS | wrapper | 2009/10/05 15:12:08 | >> http://wrapper.tanukisoftware.org >> STATUS | wrapper | 2009/10/05 15:12:08 | >> DEBUG | wrapper | 2009/10/05 15:12:08 | Using >> tick timer. >> DEBUG | wrapperp | 2009/10/05 15:12:08 | server >> listening on port 32000. >> DEBUG | wrapper | 2009/10/05 15:12:08 | Ping >> settings: wrapper.ping.interval=5, >> wrapper.ping.interval.logged=1, wrapper.ping.timeout=30 >> STATUS | wrapper | 2009/10/05 15:12:08 | Launching a >> JVM... >> INFO | wrapper | 2009/10/05 15:12:08 >> | command: "C:\windows\system32\java.exe" -enableassertions >> -Djava.library.path="../lib" -classpath >> "../lib/wrapper.jar;../bin;../lib/ojdbc5.jar;../lib/jxl.jar" >> -Dwrapper.key="abU6q_0WggJM_e9p" -Dwrapper.port=32000 >> -Dwrapper.jvm.port.min=31000 -Dwrapper.jvm.port.max=31999 >> -Dwrapper.debug="TRUE" -Dwrapper.pid=4472 >> -Dwrapper.version="3.3.6" -Dwrapper.native_library="wrapper" >> -Dwrapper.service="TRUE" -Dwrapper.cpu.timeout="10" >> -Dwrapper.jvmid=1 >> org.tanukisoftware.wrapper.WrapperSimpleApp >> xml2db.ExcelDataImporter c:\mwork2\xmlexport\xlsFiles\ INFO >> DEBUG | wrapper | 2009/10/05 15:12:08 | JVM >> started (PID=5236) >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: WrapperManager class >> initialized by thread: main Using classloader: >> sun.misc.Launcher$AppClassLoader@11b86e7 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager: Initializing... >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: JVM #1 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Running a 32-bit JVM. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Registering shutdown hook >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Using wrapper >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Load native library. >> One or more attempts may fail if platform specific libraries >> do not exist. This is NORMAL and is only a problem if >> they all fail. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Unable to >> load native library: wrapper-windows-x86-32.dll Cause: >> no wrapper-windows-x86-32 in java.library.path >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Loaded >> native library: wrapper.dll >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Calling native >> initialization method. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperJNI Debug: Initializing WrapperManager >> native library. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperJNI Debug: Java Executable: >> C:\windows\system32\java.exe >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperJNI Debug: Native Library: >> C:\Users\aka\project\source\xml2db\lib\wrapper.dll >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperJNI Debug: Windows version: 6.0.6001 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Java >> Version : 1.6.0_10-rc-b28 Java HotSpot(TM) >> Client VM >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Java VM Vendor : Sun >> Microsystems Inc. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: OS Name >> : Windows Vista >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: OS Arch >> : x86 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Startup runner thread >> started. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Control event monitor >> thread started. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: >> WrapperManager.start(org.tanukisoftware.wrapper.WrapperSimpleApp@665753, >> args["c:\mwork2\xmlexport\xlsFiles\", "INFO"]) called by >> thread: main >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Communications runner >> thread started. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Open socket to >> wrapper...Wrapper-Connection >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Failed attempt to bind >> using local port 31000 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Opened Socket from 31001 to >> 32000 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Send a packet KEY : >> abU6q_0WggJM_e9p >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: >> handleSocket(Socket[addr=/127.0.0.1,port=32000,localport=31001]) >> DEBUG | wrapperp | 2009/10/05 15:12:08 | accepted a >> socket from 127.0.0.1 on port 31001 >> DEBUG | wrapperp | 2009/10/05 15:12:08 | read a >> packet KEY : abU6q_0WggJM_e9p >> DEBUG | wrapper | 2009/10/05 15:12:08 | Got key >> from JVM: abU6q_0WggJM_e9p >> DEBUG | wrapperp | 2009/10/05 15:12:08 | send a >> packet LOW_LOG_LEVEL : 1 >> DEBUG | wrapperp | 2009/10/05 15:12:08 | send a >> packet PING_TIMEOUT : 30 >> DEBUG | wrapperp | 2009/10/05 15:12:08 | send a >> packet PROPERTIES : (Property Values) >> DEBUG | wrapper | 2009/10/05 15:12:08 | Start >> Application. >> DEBUG | wrapperp | 2009/10/05 15:12:08 | send a >> packet START : start >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Received a packet >> LOW_LOG_LEVEL : 1 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: LowLogLevel from Wrapper is >> 1 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Received a packet >> PING_TIMEOUT : 30 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: PingTimeout from Wrapper is >> 30000 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Received a packet >> PROPERTIES : (Property Values) >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: Received a packet START : >> start >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: calling >> WrapperListener.start() >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: WrapperListener.start >> runner thread started. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp Debug: start(args) Will wait up >> to 2 seconds for the main method to complete. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp Debug: invoking main method >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp: >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp: Encountered an error running >> main: >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp: >> java.lang.IllegalAccessException: Class >> org.tanukisoftware.wrapper.WrapperSimpleApp can not access a >> member of class xml2db.ExcelDataImporter with modifiers >> "public static" >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp: at >> sun.reflect.Reflection.ensureMemberAccess(Unknown Source) >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp: at >> java.lang.reflect.Method.invoke(Unknown Source) >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp: at >> org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:244) >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp: at >> java.lang.Thread.run(Unknown Source) >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperSimpleApp Debug: start(args) end. >> Main Completed=true, exitCode=1 >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: returned from >> WrapperListener.start() >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: WrapperListener.start() >> returned an exit code of 1. >> INFO | jvm 1 | 2009/10/05 >> 15:12:08 | WrapperManager Debug: WrapperManager.stop(1) >> called by thread: WrapperListener_start_runner >> |