I have been following the tutorial here:
https://docs.jboss.org/author/display/AS71/EJB+invocations+from+a+remote+client+using+JNDI
It has helped a lot with getting a JBoss 7.1.1 project with EJB 3.0 started. I have the server up and running fine with my EAR. The problem I'm having now is with the client. I don't think I have all the required JAR's in my classpath. I'm getting this error: http://pastebin.com/0mMBKjGJ
I found this tutorial: http://middlewaremagic.com/jboss/?p=1177
which has a list of the JAR's that should be included. Those are not the JAR's in the JBoss 7.1.1 modules folder though. Which JAR's should I be using?
Related
When we deploy ear in jboss 4 it is working ,But when we try to deploy same ear in jboss 6 facing issue like below
java.lang.ClassCastException: org.apache.xerces.jaxp.DocumentBuilderFactoryImpl cannot be cast to javax.xml.parsers.DocumentBuilderFactory
at javax.xml.parsers.DocumentBuilderFactory.newInstance(Unknown Source) [:1.6.0_45]
at org.springframework.beans.factory.xml.DefaultDocumentLoader.createDocumentBuilderFactory(DefaultDocumentLoader.java:89) [:2.5.6.SEC01]
at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:70) [:2.5.6.SEC01]
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:396) [:2.5.6.SEC01
Try to remove xml-apis and xercesImp dependencies. These dependencies are provided by JBoss. If it doesn't help, could you post some other informations? pom.xml or a dependency tree. Here is a link for the supported componets by JBoss EAP 6: https://access.redhat.com/articles/112673#EAP_6
Issue while Validating StAXSource in JBoss Server,
What I Tried:
I try to do parsing and validation at a time using StAX.
As described in this example.
I am able to execute the program as standalone application, but when I try it as a web application in JBoss EAP 6.1 server got below exception.
Exception:
java.lang.IllegalArgumentException: Source parameter of type
javax.xml.transform.stax.StAXSource' is not accepted by this validator.
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
There are multiple frame works modified from StAXSource to StreamSource,
TEIID-2046, activiti..etc.
I am not sure, Why JBoss is not supporting StAXSource, any clues?
Issue got resolved by adding xercesImpl 2.11.0 dependency. (as mentioned in forums_activiti)
Solution: add xerces 2.11.0 dependency.
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
Details:
JBoss EAP 6.1 has Xerces 2.9.1-redhat-4, but StaxSource enhancement released in Xerces-J 2.10.0 (For more details refer JBoss EAP Component details).
Xerces-J 2.10.0 has implementation enhancement for java.xml.validation and supporting StAXSource for JAXP validator.
Update: Added Feature Request in JBoss EAP 1.6 project.
References:
http://comments.gmane.org/gmane.comp.apache.commons.general/1770
http://xerces.apache.org/xerces2-j/
http://people.apache.org/~edwingo/jaxp-faq.html
I have a Spring MVC project that uses Maven imported into Eclipse Kepler SR1 JEE and deployed to Tomcat 7 within Eclipse. Everything was fine until I recently added elasticsearch as a dependency to the Maven pom file and now when I start Tomcat I get an exception
java.lang.ClassCastException: org.springframework.web.servlet.DispatcherServlet cannot be cast to javax.servlet.Servlet
Launching the server in verbose mode, I see that its because the servlet API is now being loaded from 2 places:
the Tomcat installation folder where it normally comes from
Loaded javax.servlet.Servlet from file:/C:/ProgramFiles/apache-tomcat-7.0.33/lib/servlet-api.jar
but also from one of the Eclipse plugins (Groovy) I have installed
Loaded javax.servlet.Servlet from file:/C:/ProgramFiles/eclipse/plugins/org.codehaus.groovy_1.8.6.xx-20130703-1600-e43-RELEASE/lib/servlet-api-2.4.jar
I can't figure out why this is happening. If I rename the servlet jar file in the plugin's lib folder (i.e. change the extension from .jar to something else so that its not recognized), Tomcat starts up without an exception but that's a hack and so I'd like to know what the cause is and if I'm missing some configuration to exclude plugin library jars from the Tomcat classpath.
Thanks.
I'm trying to make new icefaces project which generated using: ICEfaces 3.3.0 project integration for Eclipse.
I didn't modify anything on the project. but when i try to run on the server, i got an error:
cannot Deploy MyProject
Deployment Error for module: MyProject:
Exception while loading the app : java.lang.Exception:
java.lang.IllegalStateException: ContainerBase.addChild:
start: org.apache.catalina.LifecycleException:
java.lang.NoSuchFieldError: SKIP_ITERATION
before that, I'm using ICEfaces 3.2.0 project integration for Eclipse and no problem.
I'm using Eclipse Indigo, GlassFish server 3, Mojarra 2.1.6
Thanks before
java.lang.NoSuchFieldError: SKIP_ITERATION
As per the javadoc, that field was added in JSF 2.1.
So, this error suggests that your webapp's runtime classpath is polluted with a JSF 2.0 API JAR file. Perhaps in the /WEB-INF/lib? Get rid of it. Glassfish already ships with JSF bundled, you don't necessarily need to supply your own. Or, from the other side on, this can also happen if you deploy to an ancient Glassfish instance which bundles JSF 2.0 and JSF 2.1 was actually bundled in your webapp in an attempt to upgrade it. If so, then you should edited the Glassfish config file sun-web.xml or glassfish-web.xml, depending on GF version. See for detail the answer to this related question: How to update Mojarra version in GlassFish
Having deployed an EJB module in JBoss 7.0.1, I am trying to access it from a client executing on another JVM. However, I am unable to figure out the client side jars needed to add to my client's classpath.
I tried out with the following:-
jboss-ejb-api_3.1_spec-1.0.1.Final.jar
jboss-ejb-client-1.0.0.Beta11.jar
3.jboss-logging-3.1.0.CR2.jar
jboss-marshalling-1.3.4.GA.jar
5.jboss-marshalling-river-1.3.4.GA.jar
jboss-remoting-3.2.0.CR8.jar
7.jboss-sasl-1.0.0.Beta9.jar
jboss-transaction-api_1.1_spec-1.0.0.Final.jar
xnio-api-3.0.0.CR7.jar
There seems to be some inconsistency in this setup and I get this exception:-
INFO: JBoss EJB Client version 1.0.0.Beta11 Nov 9, 2012 12:01:04 AM
org.xnio.Xnio INFO: XNIO Version 3.0.0.CR7 Nov 9, 2012
12:01:04 AM org.jboss.ejb.client.ConfigBasedEJBClientContextSelector
createConnections ERROR: Could not create connection for connection
named default java.lang.IllegalArgumentException: No matching XNIO
provider found at org.xnio.Xnio.doGetInstance(Xnio.java:192) at
org.xnio.Xnio.getInstance(Xnio.java:146) at
org.jboss.remoting3.Remoting.createEndpoint(Remoting.java:73)
...
I didn't have any issues while having a client access an ejb deployed in JBoss 7.1.0 Final, JBoss 6.1.0 Final or Glassfish servers. The jars required at the client side war available.
I am a newbie in Java EE and Application Servers by the way and I am trying to learn in the process.
Thanks.
please add xnio-nio-3.0.3.GA.jar in your classpath
In addition to Ramkumar's answer, I am adding the maven dependency for this jar. Following the maven dependency for the jar:
<dependency>
<groupId>org.jboss.xnio</groupId>
<artifactId>xnio-nio</artifactId>
<version>3.0.3.GA</version>
</dependency>