Have installed the websphere 8.5.5 for developers and also websphere eclipse development tools. setup a new server in eclipse with websphere and also built a new profile.
The server starts fine the and when i want to set it up via a jython script (Administration > Run administrative script ...) i get the following error.
Does anyone know what the problem might be:
Exception in thread "main" java.lang.NoClassDefFoundError: Files
Caused by: java.lang.ClassNotFoundException: Files
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:688)
at java.lang.ClassLoader.loadClass(ClassLoader.java:667)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:650)
Could not find the main class: Files. Program will exit.
This looks like a classic whitespace in path name, like "Program Files" problem, try installing to a directory with no spaces.
Related
Before I explain the problem, I just want to point out that I am completely new to NetBeans and Tomcat and I am doing a school project. That being said, the problem is exactly what the title says. Here is the output when I try to run a simple Hello World jsp:
In-place deployment at
C:\Users\lostl\OneDrive\Documents\NetBeansProjects\Project3\build\web
Deployment is in progress...
deploy?config=file%3A%2FC%3A%2FUsers%2Flostl%2FAppData%2FLocal%2FTemp%2Fcontext7180600714574256491.xml&path=/Project3
FAIL - Failed to deploy application at context path [/Project3]
C:\Users\lostl\OneDrive\Documents\NetBeansProjects\Project3\nbproject\build-impl.xml:1058: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 0 seconds)
I am using Apache NetBeans 11.2 and Tomcat 9 if it is relevant.
Here is what I tried:
I checked the server log and it displays absolutely nothing.
I tried setting the context path directly to Project3 (i.e. including the -C:/... before Project3) in the context.xml file under META-INF folder.
I tried restarting NetBeans and cleaning and building the project.
I tried running NetBeans under admin privileges.
I might seem like such an idiot for not knowing how to fix this since no one else seems to have this problem, but please help me out.
If you have installed the Apache Tomcat appart from Netbeans, maybe your apache service is already running and it conflicts with Netbeans. You may stop the apache service and then run the application in Netbeans.
Because Netbeans start the apache service in a diffent way, so you don´t need to install the aplication on apache´s folder.
Check out the Windows Services (Services App) and stop the Apache Tomcat if running, then from Netbeans menu select Run->Run Project. Netbean will start Tomcat and deploy your web app onto the Tomcat server.
I fixed it. All I had to do was restart my computer. I feel so dumb.
clean your project if clean project failed to delete some file then,
Just check there must be a java process running at background.
If you are using windows 10 then follow these steps
open command prompt and type below commands
tasklist | findstr java (hit enter now you can see a task list with pid number )
taskkill /F /PID "PID_OF_JAVA_PROCESS" (where PID_OF_JAVA_PROCESS--> task pid hit enter)
now run the project again
I faced this problem and found a solution. It is very simple. All you need to do is stop the Tomcat services or restart your computer and run your program.
I can't update NetBeans, I always get "Unable to connect to the Update Center".
I already checked the windows firewall settings:
I also checked the proxy, I get a green checkmark:
What else can I try?
I am using NetBeans 8.2 (Build 201609300101)
Proxy settings were NOT the problem for me.
I'm running NetBeans 11.0, and see that there are 4 default "Update Centers" configured. Having nothing to do with Proxy settings, I discovered that the "NetBeans Plugin Portal" URL was failing https://netbeans.apache.org/nb/plugins/11.1/catalog.xml.gz, and the last time this site was successfully checked was on 4/20/21.
My solution was to deselect that Update Center, and added the 11.0 archive site instead:
http://plugins.archive.librebeans.org/catalogue/11.0/catalog.xml
Now I can update/install plugins as expected. Maybe this is the solution for you too.
there is a number of similar questions from long ago (e.g. this one), and the suggestions are mainly about misconfigured proxy.
in my case, looking at the IDE log file revealed the following stack trace:
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Timeout while opening connection to http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/enterprise/org-netbeans-modules-websvc-metro-lib.nbm
java.util.concurrent.TimeoutException
at java.util.concurrent.FutureTask.get(FutureTask.java:205)
at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$1.run(NetworkAccess.java:111)
Caused: java.io.IOException: Timeout while opening connection to http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/enterprise/org-netbeans-modules-websvc-metro-lib.nbm
at org.netbeans.modules.autoupdate.updateprovider.NetworkAccess$Task$1.run(NetworkAccess.java:131)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1443)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:68)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:303)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2058)
INFO [org.netbeans.modules.autoupdate.services.InstallSupportImpl]: Cannot access http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/enterprise/org-netbeans-modules-websvc-metro-lib.nbm
java.io.IOException: Cannot access http://bits.netbeans.org/dev/nbms-and-javadoc/lastSuccessfulBuild/artifact/nbbuild/nbms/enterprise/org-netbeans-modules-websvc-metro-lib.nbm
at org.netbeans.modules.autoupdate.services.InstallSupportImpl.copy(InstallSupportImpl.java:981)
[catch] at org.netbeans.modules.autoupdate.services.InstallSupportImpl.doDownload(InstallSupportImpl.java:733)
at org.netbeans.modules.autoupdate.services.InstallSupportImpl.doDownload(InstallSupportImpl.java:661)
at org.netbeans.modules.autoupdate.services.InstallSupportImpl.access$600(InstallSupportImpl.java:92)
at org.netbeans.modules.autoupdate.services.InstallSupportImpl$1.call(InstallSupportImpl.java:172)
at org.netbeans.modules.autoupdate.services.InstallSupportImpl$1.call(InstallSupportImpl.java:144)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Because I thought that was nothing wrong with my proxy settings (no proxy is selected, and connection is tested OK), i searched and search, getting even into the NetBeans code, trying in vain to find some hidden Timeout property. Indeed there is a place in the code (AutoupdateSettings.getOpenConnectionTimeout which seems to correspond to plugin.manager.connection.timeout property) which sets a timeout - yet i couldn't make it work (mucking with .properties files in ~/AppData/Roaming/NetBeans/8.2/config/Preferences/org/netbeans/modules/autoupdate)
In the end the only workaround I found was to download the NBM file mentioned in the stack trace manually. It seems that it was either indeed my firewall (an antivirus check?), or the file was just too large in itself and would cause the timeout because of this. Or the overloaded server. Anyway.
Fortunately, it is possible to install the downloaded file through Tools -> Plugins -> Downloaded -> Add Plugins, even though that plugin already is installed. Doing this the update process continued normally (although there was another timeout later - so I repeated the above procedure) and eventually completed.
The above plugins, for which I had to do manual install, were METRO 2.0 and JAXB 2.2
I need to create an Applet that can load a com method, for this purpose I used the java com bridge (jacob) deal with the com dll, and My Environment is set as follow:
os:win7x64
IDE:Eclipse32bit-version
COM DLL:BPIKeyCOM.dll 32-bit version
com bridge : jacob1.17-32bit version
server: Tomcatv7.0
I put jacob.dll under C:\Windows\System32 and jacob.jar under WEB-INF\lib
When I run the project, it's working fine in Eclipse. But when deployed on the web, the following error messages appear:
java.lang.NoClassDefFoundError: com/jacob/activeX/ActiveXComponent
at Fmain.Ikeycheck(Fmain.java:180)
at Fmain.init(Fmain.java:73)
at sun.applet.AppletPanel.run(AppletPanel.java:435)
at java.lang.Thread.run(Thread.java:724)
Caused by:
java.lang.ClassNotFoundException: com.jacob.activeX.ActiveXComponent
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:219)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:152)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)...
It looks like this message is talking about that it can't find com/jacob/activeX/ActiveXComponent.class, but I don't understand how.
I've already searched for many solutions and tried to solve it, but it still keeps showing this error message, I use to do sigh jar, make sure the classpath is correct, and even try to change the policy file...etc. But still, it's not working!
You've installed the dll and jacob.jar into your Java Web container; unfortunately, that is not the user's web browser (e.g. Applet Container). You need to add the dll and jacob.jar file into the applet jar. You should probably also read this. It's also important to point out that if your users install a 64-bit jdk, or aren't running Windows - then your Applet will not work.
Have a look at the example provided with jacob:
e.g.
jacob-1.17_src.zip\jacob-1.17\samples\com\jacob\samples\applet
This is a nice example how it works - it even has a readme.txt with a full description inside...
I have used MacPorts to install tomcat 6 for use with launchctl.
launchctl start org.apache.tomcat provides the following result in Catalina.date.out:
java.io.FileNotFoundException: /opt/local/share/java/tomcat6/conf/Catalina/localhost/host-manager.xml (No such file or directory) at java.io.FileOutputStream.open(Native Method) and so on
Lo and behold, there is no folder called Catalina in conf.
I don't know if this is responsible for the applications not being deployed or not, but I felt that since it's a severe issue it should be noted.
Then comes SEVERE: Error deploying web application directory manager
java.io.FileNotFoundException: /opt/local/share/java/tomcat6/conf/Catalina/localhost/manager.xml (No such file or directory)
at java.io.FileOutputStream.open(Native Method)
and for each of the folders in the webapps folder, I get
The scratchDir you specified: /opt/local/share/java/tomcat6/work/Catalina/localhost/examples is unusable.
I have been googling this for some time now, but I have not yet stumbled across an answer.
The issue was to do with Tomcat from Macports and permissions.
My end solution was to install and configure tomcat manually.
I'm using install4j and it works fine for the 10 languages we've got translations for, however if a user tries to install on a (windows XP) machine that's using another language eg Russian or Estonian, then an error.log file is created in the directory containing the installer. The installation completes without any apparent problems and gives a choice of language to run in but also creates the error log.
Am I doing something wrong? Or can I suppress the error?
Is this fixed in later versions of install4j (I couldn't see any mention in the change logs and it's non-trivial to ask for our build machine's install4j to be upgraded)
Is there already an open install4j bug?
Do I need to collect more diagnostics?
any ideas?
Recreation Steps:
Control Panel-> Regional & language settings-> Regional Options-> Standards & Formats-> Estonian
Run Installer
Error.log then contains:
java.lang.NoClassDefFoundError: sun.awt.AppContext$PostShutdownEventRunnable
at sun.awt.AppContext.stopEventDispatchThreads(AppContext.java:535)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:296)
at java.lang.Thread.run(Thread.java:736)
java.lang.NoClassDefFoundError: java.nio.charset.Charset$3
at java.nio.charset.Charset.probeExtendedProvider(Charset.java:397)
at java.nio.charset.Charset.lookupExtendedCharset(Charset.java:420)
at java.nio.charset.Charset.lookup2(Charset.java:454)
at java.nio.charset.Charset.lookup(Charset.java:440)
at java.nio.charset.Charset.isSupported(Charset.java:486)
at sun.nio.cs.StreamEncoder.forOutputStreamWriter(StreamEncoder.java:79)
at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:91)
at com.exe4j.runtime.util.WinDel.scheduleDeletion(Unknown Source)
at com.exe4j.runtime.WinLauncher$3.run(Unknown Source)
The error.log is actually not from the installer process but from a cleanup process that is launched when the installer exits. The cleanup process deletes the temporary directory to which the installer has been extracted. Due to this exception, that temporary directory has probably not been deleted. The integrity of the installation has not been impacted.
Interestingly, this error can only happen if the encoding "UTF-16LE" is not available in the JRE. However, this is one of the basic encodings that have to be available. So it looks like there's a bug in the JRE that is triggered in this specific situation.