jboss error migrating EJB 2.X ap to jboss 5 - jboss5.x

I migrating someone else's EJB 2.X app from jboss 3 to jboss 5 (and then maybe onto AS7).
When I do a test deployment of one of the EJBs I am getting this error
org.jboss.deployment.DeploymentException: Could not load class:
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData.<init>
(JDBCEntityCommandMetaData.java:76)
at org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityMetaData.<init>
(JDBCEntityMetaData.java:954)...
Googling this stack trace doesn't give me any leads I can work on. As far as I can tell this means that the entity-command in conf/standardjbosscmp-jdbc.xml is wrong but I have no idea what it should be. Looking at the jboss 3 conf/standardjbosscmp-jdbc.xml file doesn't even have an entity-command listed so I assume "default" should be ok, no? I am using Oracle 11g, if that is meaningful and otherwise seem to have no db connection issues. The Oracle datasource seems to be created without problems. This is the very first error in the output. Any clues as to what i should look a to resolve this?

Are you sure you build everything against JBoss 5 libs? This could be a build problem...

Related

Jboss AS7 to Wildfly 10 Migration

im trying to migrate JBoss AS7.1 to Wildfly 10, i just followed some threads and i came upon this AS7 to Wildfly 10 guide. Basically it just tells how to migrate server configuration as well as application configuration.
But the problem is, it says to execute ":migrate" function "/subsystem=jacorb:migrate" on jboss cli (Jboss AS7.1 because it says execute on legacy subsystem) but it always throws an error, see below
No handler for migrate at address
Anyone familiar in executing migrate on jboss cli please point me to the right direction
UPDATES
I opted to migrate to wildfly10 from jboss-as7.1 manually (labor intensive, hassle), maybe if i have time to investigate about this i could feedback it there but as of know i time is of the essence and i need to migrate immediately.

Jboss (Wildfly 9.0.1) - Remote EJB calls stops responding Intermittenly

We are upgrading JBOSS from (4.0.2) to latest Jboss (Wildfly 9.0.1) for our J2EE webApp. After upgrading we found that EJB calls are stop responding after 1 hour of load test.
Please note that the other areas of application is working fine where EJB is not used. The problem is only with remote EJB calls.
We have to restart Jboss to fix the issue.
Do we need to any configuration (threads/EJB pool) in Jboss (Wildfly 9.0.1)?
I'd just like to drop in and say that we're experiencing the same thing. What I recall reading is that this happens when the Wildfly has to wait to long to return an answer and suddenly the whole service becomes unresponsive.
We were running 8.2.0 Final and the only suggestion I could find was to upgrade. After performing an upgrade to 9.0.1 Final we're still seeing this. There was seemingly more people experiencing this but I have not been able to find any solution yet. The issues I found on the JBoss issue tracker on this have all been rejected and they're implying that it's more open for community discussion.
I have this lingering notion that toying around with timeouts might help though I haven't had time to try this yet.
P.S. I'm not privileged enough to simply comment which I would preferred.

Migration from JBoss 4 to JBoss 6. What to concider?

I'm trying to deploy my application in JBoss AS 6. Currently it is deployed in JBoss version 4.
So what are the things I need to consider when doing this?
Any help will be highly appreciated. Thanks.
You're talking about two major versions change, so, expect a lot of things to happen. Some steps that might be helpful:
Make an inventory of everything that is JBoss-specific in your project: deployment descriptors being the most common examples, but you might also be implementing some specific classes for your own use, or things like that
Make an inventory of the Java EE APIs that you are using. For instance, JPA 1.0, JSP 1.1 and so on. With those, compare with the APIs that are available for AS 6. I guess that most of your work will be centered here.
You might also want to take note of changes in the Java version (AS 4 was released during the days of Java SE 5, IIRC).
Finally, you might want to take a look at the Windup project, which is a tool that can help you migrate your applications to JBoss AS. Note, however, that it will not give you a comprehensive list of everything you need to do, but will certainly give you good hints.
One last comment: you might want to consider migrating to JBoss EAP 6, which is JBoss AS 7, or even migrating to Wildfly 8 (the successor of JBoss AS 7).

Determining version of jboss programmatically between jboss 5 and 7

I'm trying to find the best way to grammatically determine if my program is running on Jboss 5 or Jboss 7 (eap-6.1). The ways I've been finding so far are jboss 5 or jboss 7 specific, which doesn't work because the code has to work in both. Tried both solutions from here: How do I programmatically obtain the version in JBoss AS 5.1? and they didn't work. One complained about org.jboss.Main not existing in jboss 7, the other complained aobut not finidng "jmx/rmi/RMIAdaptor".
The only way I can see is to do Class.forName to look for "org.jboss.Version" (should be found if jboss 5) and if that fails, do Class.forName "org.jboss.util.xml.catalog.Version" (jboss 7). But that seems like a terrible idea.
The reason I need to know if the war is running on jboss 5 or 7 is because there are some custom files that are located in different places in both. So it's like "if jboss 5, execute this piece of code, if jboss 7 execute the other.
Ok i just saw what the problem is.
I would suggest you to think about design issues/refactoring of your software.
If you want to provide your software within different environments, seperate your logic from
technology dependencies.
Build facedes and interfaces to meet environmental requironments.
In my oppionen thats much better as to think we must support all integration platforms and support all there versions. This is completely impossible.
So decouple your business logic and offer specific interfaces. These interfaces (adapters) are much simplier to implement and to maintain.
Hope it helps.
UPDATE DUE TO COMMENT.
I think a solution is for servers 4 to 6 is to use
the MBean Server of JBoss to lookup the registered web application
which is associated to the deployed WarFile.
I suggest first to lookup the registered MBean of the web application manually using the JBoss jmx-console. The name of the WebApplication should be found under the capital "web" or "web-deployment" within the jmx-console.
If you found that name you can implement an own jmx based lookup mechanism
to check for that name.
Here is an Tutorial: pretty old but i think it gives you an idea how to do.
There must be more tutorials for this problem:
http://www.theserverside.com/news/1364648/Using-JMX-to-Manage-Web-Applications
Within JBoss 7 i just can give you the hint that its architecture is based on OSGI. So to lookup for other services you should have a look to this mechanism.
In any case you don't have direct access to the file system and the deployment directory
from an application which is deployed within a JEE container, except of
using the mechanisms provided by the container. JNDI Lookup, JMX ManagedBean mechanism, Java Connector Archicture (JCA) (makes no sense in your case)
It's not an answer just an suggestions since the implementations are completely different
One way could be to use the "interceptors" which are executed during bootstrap and before any ejb invocation and there you have access to the invocation context in other words ejb container.
I can't give you any example but this would be an access point to start.
Another accesspoint is to check for system wide JMX Beans by looking through the
Adminstratore console of the JBoss Server.
You can inject JMX Bean state into your application through the Context Mechansim.
Take a look from Version 4 to 6 at the JMX Managed Bean mechanism. The JMX Achitecture is the main concept of JBoss 3 to 6, so at this point you can influence and maintain the JBoss behaviour.
Aditionally i think you have differences from 4 to 6.x version and 7.0 because since
7 it's a completely new architecture. Since 7.0 the JMX architecture doens't exists anymore.

JBoss AS 7.1.1 Final - Accessing EJBs deployed in JBoss AS 6

I need to access EJBs deployed in JBoss AS 6, but I am using JBoss AS 7.1.1 Final, which dropped the JNP lookup.
Is it possible to do so, or do I need to downgrade to JBoss AS 6 (upgrading the other server is impossible)?
I've dug through the AS 7 forums and SO, but did not find any references for this..
Thanks in advance!
In general EJB remote communication between two different servers never works.
JBoss is especially known to have a total lack of attention for compatibility. Even a minor difference in version (a minor security update for instance) is already enough to break compatibility. I know for a fact that EJB remoting between JBoss AS 5 and 6 does not work, and I'm pretty sure it doesn't work between 6 and 7.
The root of the problem is that Java EE never specified how remote bean discovery should take place and what the requirements for the client exactly are (one exception is the application client container, which only works in Java SE and is so arcane that almost nobody uses it).
Most vendors use some kind of client jar, which in case of Jboss is nearly the entire server. Because it's nearly the entire server, you can't include it in another server as hundreds if not thousands of classes would clash.
A Jboss employee once started an experiment with an isolating class loader that would load these clients libs isolated from the main server, but as far as I know nobody ever got this to work.