Hot deploy not longer working on JBoss ("Scheme change not implemented") - java

I've got a pretty annoying problem with my JBoss AS 4.2.3 GA.
Until recently everything was running fine, but now the hot deploy feature is now longer working. And -- as always -- I don't know what I did to cause this behaviour.
My projects are built with Maven. I've cleaned every target directory, installed the projects and then deployed them to the server. So the sources in Eclipse and the deployed projects on the server should be identical.
Inside a method I've added a simple System.out.println("test"); statement and -- BANG! -- I get the following error:
(source: imagefruity.com)
Do you know a way out of my trouble?

Ok, I did the following things now:
Uninstall all JDKs
Install only one JDK, namely JDK5 (cause that's the one we use in production)
Clean, install and deploy every project anew
And now it seems to work (I'm keeping my fingers crossed).
I've used JDK 6 Update 20 for building in Eclipse and JDK 6 Update 7 in Maven. Maybe that has caused the problem.

In my case "Hot code replace failed - Scheme change not implemented" was caused by IDE using another compiler than compiler used to build files deployed on J2EE server. You can binary compare class files in your J2EE archive with class files compiled by IDE in your workspace - they should be identical.
For details please check here.

Related

failed to run tomcat in eclipse

I was doing a servlet project in eclipse.
when i tried to run my tomcat server in eclipse like this(right click server-start)
run tomcat in eclipse
(and neither can i run my servlet app on tomcat through eclipse)
it'll show "a java exception has occured"
java exception
and in the debugging window,it look like this
console output
Exception in thread "main" java.lang.NoClassDefFoundError: java/util/logging/Logger
at org.apache.juli.logging.DirectJDKLog.<init>(DirectJDKLog.java:61)
at org.apache.juli.logging.DirectJDKLog.getInstance(DirectJDKLog.java:181)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:133)
at org.apache.juli.logging.LogFactory.getInstance(LogFactory.java:156)
at org.apache.juli.logging.LogFactory.getLog(LogFactory.java:211)
at org.apache.catalina.startup.Bootstrap.<clinit>(Bootstrap.java:50)
Caused by: java.lang.ClassNotFoundException: java.util.logging.Logger
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 6 more
the problem is ,the server was perfectly well in eclipse yesterday,and although i can't run tomcat in eclipse ,i can start tomcat outside eclipse.i tried a different version of tomcat,reinstall eclipse and tomcat,and searched online,but the problem was not solved
i installed jdbc for sqlserver and imported the sql-jar in one of the java project in eclipse ,and besides that,i cant think of anything that can possibly make this happen....
and before i tried to reinstall tomcat,there was another error in eclipse ,,Could not load the Tomcat server configuration at \Servers\Tomcat v8.0 Server at localhost-config
and after i reinstalled tomcat,this was gone ,but tomcat still cant run
thank you for your time..btw
the problem was solved just after i posted this question.....
i tried to use a different completely new workspace for eclipse ,and it worked..
i have no idea why...
-----update---------------------------------------------
i found where the problem is,but still dont know why.
like i said above,i was trying to install jdbc and java-sql environment,within the steps,there was one step it requires to specify the exact loction where my jre folder is,(something like that)
and i was using jdk12, which dont have a jre folder in the jdk folder,and i found a way to generate the jre folder manually,and that was what i did.and the database part worked out pretty good.
(it seems the jdbc version i used is not the best,i suppose in the correct version it doesnt require a jre folder to be specified)
anyway,after i deleted the jre folder i generated manually, i re-configured the tomcat server in eclipse,and then the server can run in eclipse
Few points you can verify
Make sure you are using Eclipse JEE version
Your tomcat and Eclipse should be using JDK 8 and above, and have the same JAVA_HOME path reference.
Also, stop all the tomcat instance, if you are running outside.
Try changing the default the tomcat ports, mainly HTTP, startup and shutdown port

I just installed eclipse, why won't eclipse run any of my code?

I cannot get eclipse to run any code whatsoever. I have just begun using eclipse and think I may not have installed the jre/jdk properly because I have tried running different code and always get the same error. This is the error message I got as soon as I opened the workbench and tried to run something the first time:
Error occurred during initialization of boot layer
java.lang.module.FindException: Module tutorial1 not found
Everything appears to be there in my file system, but then again I have never done a successful build so I'm not entirely sure how it should look. I'm just getting started learning java development and this is rather discouraging. Why won't eclipse run any code? Are there other steps I should have taken before installing eclipse?
I have tried running different code and always get the same boot layer message. I have also tried installing multiple versions of the jre, jdk, and eclipse and it still doesn't work.

Can't run service builder (liferay 6.2)

I'm running Eclipse Neon (tried with Mars too) and Liferay 6.2
I try to run the service builder but:
If I run with java 8 (unsupported, I know), it says it requires a 1.6 compliant JVM. Correct.
If I run with java 7, it says "Unsupported major.minor version 52.0". That's my nightmare.
Yes, I've cleaned everything before. In fact, I created a brand new project, in an Eclipse with only jre7 installed, pointing all to jre7 (compiler, facets...)
Eclipse is running over jre8, but can't run on jre7 because some of the plugins requires jre8. Anyway, some days ago it do worked in this Eclipse, so it's not the problem.
Service Builder might pull code from more than your Eclipse project setup - e.g. from the running Liferay installation that the plugin sdk points to.
I've not heard of a com.aspr.seu package in Liferay - is that your own, or unknown to you as well?
If service builder ran in the past (e.g. with Java 8), it created a yourprojectname-service.jar - that might be one that is pulled into the build process and that you might not have cleaned yet. You definitely have a class that was built with Java 8 on the classpath, you'll just need to find it. It might help to know that servicebuilder is executed through an Ant task outside of Eclipse, thus it might not be enough to search through all of the files that Eclipse has configured on its classpath, but rather on what's configured for the Plugins-SDK

Maven shaded uber-jar: Jar throws exception if build on one particular system

I have a java maven project which I pack with maven-shaded as standalone runnable fat-jar.
If I create the jar on my MacBook Pro it fails after some time (iMac and Linux).
If I create the jar on my iMac it runs flawless on any system
I am unaware of any differences between my two systems. Both java 8, Eclipse Luna, same project and pom configuration.
I noticed some time ago that the size of the jars differs too depending on which system it was build which probably should also not be the case, right?
I originally started debugging like crazy what is wrong with my code, but could/still can't find anything. I am wondering if this might be some maven problem? The fact that it runs if compiled on the iMac gives me at least a certain confidence that it is not a classical program bug.
Has anyone made similar observations or has a hint for me what the cause of the problem could be?

How to create an enterprise application client with Netbeans 7.4 and JBoss 7?

I try to create an enterprise application client with JBoss by following this official tutorial (based on Glassfish):
https://netbeans.org/kb/docs/javaee/entappclient.html
but I get this error message: Error: Unable to access jarfile C:\EntAppClient\${client.jar}
As far as I know, Netbeans IDE supports JBoss 7 since its version 7.3 RC1 and I use Netbeans 7.4. This feature seemed already broken for a long time according to this thread:
http://forums.netbeans.org/topic40270.html
It is expected to work as Netbeans is intended to support other application servers. However, some Glassfish specific properties are hardcoded inside the Ant build scripts and the property client.jar is set if and only if j2ee.clientName isn't set which isn't my case (it's set to EntAppClient.jar).
When I set client.jar to ${dist.dir}/${j2ee.clientName}, I go a bit further but Netbeans doesn't find the JAR of the remote interface and the Glassfish specific agent class loader org.glassfish.appclient.client.acc.agent.ACCAgentClassLoader.
How can I make it work? I'm going to try to fix build-impl.xml to use the correct classpath and I hope to find a smarter solution.

Categories

Resources