I am using Websphere application server 8.0.0.2 and Rational application developer(RAD- 8.0.4)
When i try to start the WAS from RAD servers tab. It worked fine for two to three times and later it started giving
Exception in thread "main" java.lang.NoClassDefFoundError: RESOURCE
Caused by: java.lang.ClassNotFoundException: RESOURCE
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:665)
at java.lang.ClassLoader.loadClass(ClassLoader.java:644)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:627)
Could not find the main class: RESOURCE. Program will exit.
I reinstalled WAS and tried, it was working fine, i was able to start the server properly for 1 or 2 times, then again the same error after i reopened RAD.
Please help.
Trying cleaning the server:
Go to the servers view, right click on the server and select "Clean...". This dumps all the cached application and state files. This will then start the server and publish whatever project is on it.
Related
This is a possible duplicate of Intellij docker with live update of EAR inside websphere, but that question is 3 years old and the answer "not supported" is maybe outdated.
Via IntelliJ IDEA (2020.3 Ultimate) on Windows 10, I want to deploy an application (EAR) into a Websphere Liberty server which is running in a docker container. This worked with traditional websphere, now we are switching to WLP. Is this possible at all?
The server is up and running. I'm perfectly able to copy the ear to the (mounted) "dropins" folder and the server picks it up, expands it and deploys it without problems.
I'm also able to attach the debugger in IntelliJ to the server and it will stop at breakpoints, it can even successfully update code ("hot swap classes").
What I did already:
I configured ports (7777,8880,9043,9443,9080) to forward 1:1 from the container to my local machine. I can successfully access at least port 9080 through a local browser.
I downloaded Websphere Liberty, Full Java EE 8 Profile, the same version as in the docker container, from IBM official website to my local hard drive, and expanded the zip.
Then I tried to follow the guide https://www.jetbrains.com/help/idea/run-debug-configuration-websphere-server.html and added a Run/Debug Configuration "Websphere Remote", I chose the expanded folder for IntelliJ for the "Application Server" configuration (I know that IntelliJ needed a local installation of Websphere for traditional version, so this may hold true for WLP as well).
I added the EAR-artifact for deployment in the Run Configuration. I copied the server name from the one inside docker and set the connection settings (localhost:9080).
The first try ("Test Connection") resulted in an error from IntelliJ: Error running 'WebSphere Application': JMX file not found: C:\[...]\wlp-javaee8-20.0.0.12\usr\servers\defaultServer\workarea\com.ibm.ws.jmx.local.address
Then I tried and copied this file from my docker container, it had the content
service:jmx:rmi://127.0.0.1/stub/[... some seemingly byte64-encoded string] to the local path. This resulted in a different error: Error connecting to the Application Server: java.rmi.ConnectException: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect
I also tried to use the content of the file com.ibm.ws.jmx.rest.address which was service:jmx:rest://localhost:9443/IBMJMXConnectorREST, (where I replaced the internal host name of the docker container by "localhost"), but that resulted in Error running 'WebSphere Application': java.net.MalformedURLException: Unsupported protocol: rest
If I start the local server on my machine (not in docker), connection works and deployment too. But this is not my aim.
PS: My server.xml contains <applicationMonitor updateTrigger="mbean"/>.
I have installed glassfish 5 successfully and even managed to create a new domain and deploy my application successfully but whenever I stop and try to start the glassfish service again it fails to start completely. I have browsed all over the internet and non of the solutions have worked. Here is my journal -xe logs for the error. Hope someone can point out what I might have done wrong during the installation process enter code here
I built the WAR file of my application https://github.com/JonkiPro/REST-Web-Services. I put it on the Tomcat server and clicked START. Then he threw the error https://zapodaj.net/44f410f8abc74.png.html
FAIL - Application at context path [/WebApplication] could not be started
FAIL - Encountered exception [org.apache.catalina.LifecycleException: start: ]
java.lang.RuntimeException: Failed to get driver instance for jdbcUrl=jdbc:h2:mem:database
and wrote in the logs https://pastebin.com/7rWhPFLt.
I will mention that the application after compilation in IntelliJ works without a problem.
My application works on port 8443. I do not know if it matters. It seems to me that Tomcat has a database problem?
I'm using the following on Windows 7:
neo4j-community-1.9.2
Java 7 Update 25
I have Windows Firewall disabled.
When I start Neo4j.bat, both as Administrator and normally, I get the following message:
c:\Tools\neo4j\bin>Neo4j.bat
28/07/13 9:34:27 PM org.neo4j.server.AbstractNeoServer INFO: Setting startup tim
eout to: 120000ms based on -1
A blank Java console window pops up, no messages, then the window disappears after a minute or so.
When I go to http://localhost:7474/, I just get a server not found error.
If I try to install it as a service, the service wouldn't start.
Any ideas what I need to do to start Neo4j? I see here that Neo4j 1.9 does support Java 7:
http://blog.neo4j.org/2013/03/neo4j-19m05-released-wrapping-up.html
base.bat correctly points to windows-service-wrapper-5.jar, so not the windows-service-wrapper-*.jar problem that some people have had in the past. It would be helpful if it outputted an error message.
I just tried it with neo4j 2.0 milestone, and it didn't make any difference. The Java window pops up with no messages, http://localhost:7474/ gets a server not found error, then the Java window closes after a minute or two.
I added JAVA_HOME and JRE_HOME system variables, made no difference. I think I would get an error if Neo4j was not able to locate Java anyway.
I've fixed it.
With help from Neo4j's Google Group, I looked at the logs in data/logs/*.log and data/graph.db/messages.log, and found the following exception:
Caused by: java.rmi.server.ExportException: Port already in use: 1337; nested exception is:
java.net.BindException: Address already in use: JVM_Bind
Once I disabled my other service that uses that port, Neo4j's web admin at http://localhost:7474 worked. I then found out port 1337 is used by Neo4j's remote shell, I disabled it by adding enable_remote_shell = false to neo4j.properties, then I was able to have both Neo4j and my other service running.
I'm using the version 2.2.1 community edition of Neo4j on Windows 7, Java 1.8 update 45
In my case the log file messages.log was under default.graphdb directory. In there, you'll see the root cause of the problem.
We have a Java application that we deploy using .war files on tomcat server. The war is copied on the webapp directory (tomcat stopped) and then we start the server. We have several scripts that automate the process and we have deploying on development-backup and production servers without problems until two days ago... Then we were able to deploy on development machines, but in backup and production (ovh machines) we received an exception starting tomcat:
### Error building SqlSession.
### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: java.io.IOException: Stream closed
org.apache.ibatis.exceptions.PersistenceException:
### Error building SqlSession.
### Cause: org.apache.ibatis.builder.BuilderException: Error creating document instance. Cause: java.io.IOException: Stream closed
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:51)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:39)
Redeploying old .war works fine, but new .war produces all the time this exception. We have spend lot of hours trying to figure out what is wrong, but the same .war that does not work on production work on a development machine and (this is incredible) if we deploy using another name for the war (just renaming the .war file) the application works.. But we need the application to work using this specific context name.
Please... help!
Finaly solved...
The main reason was the checking url from haproxy that in this version uses database, so, while the context are deploying haproxy try to load this url and causes several initializations on mybatis...
Changing the url haproxy query solves the problem, but I'm not sure the good way to avoid the initialization problem under load.