[EJB 3.0] - ejb-all.jar and XMLInputFactory
by pgrillo
We use jboss-ejb3-all.jar along with Seam and Tomcat. I am now integrating some of our own technology into it. We use Woodstox XML processor along with the stax api.
wstx-asl-2.9.3.jar and stax-api-1.0.1.jar
Now jboss-ejb3-all.jar has an implementation of javax.xml.stream.XMLInputFactory.
However, when i issue a
XMLInputFactory f = XMLInputFactory.newInstance();
which uses the version inside of jboss-ejb3-all.jar it insists on trying to use "com.bea.xml.stream.MXParserFactory" as the implementation and does not pick up Woodstox. I have no com.bea.xml.stream.MXParserFactory so i can't move on, wish to use Woodstox.
I generally understood that the rules for determining what to use is below, and works perfectly with stax-api.jar since the woodstox jar file provides the appropriate files in META-INF/services.
Could somebody please tell me how i can direct XMLInputFactory in jboss-ejb3-all.jar to pick up my XMLInputReader properly? Other than using a system property? I really don't wish to manage which version of this class gets picked up first to ensure that our app works, and i don't want to break apart jboss-ejb-all.jar.
anonymous wrote : Deriving from JAXP, the XMLInputFactory.newInstance() method determines the specific XMLInputFactory implementation class to load by using the following lookup procedure:
|
| 1. Use the javax.xml.stream.XMLInputFactory system property.
| 2. Use the lib/xml.stream.properties file in the JRE directory.
| 3. Use the Services API, if available, to determine the classname by looking in the META-INF/services/javax.xml.stream.XMLInputFactory files in jars available to the JRE.
| 4. Use the platform default XMLInputFactory instance.
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021146#4021146
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021146
19Â years, 2Â months
[Installation, Configuration & Deployment] - Urgent:Error while accessing deployed application in JBoss4.
by ushashi
Our application got successfully deployed in JBoss4.0.3SP1 in linux environment
ANT version 1.7.0
JDK version 1.5.0.06
Ant and JAVA path are mentioned in profile and
version of ant and java are echoed correctly when we give ant -version and java -version.
Error Description:
While accesing the application we get the following error,
The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: org/apache/tools/ant/Main
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:272)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
root cause
java.lang.NoClassDefFoundError: org/apache/tools/ant/Main
org.apache.tools.ant.Project.initProperties(Project.java:308)
org.apache.tools.ant.Project.init(Project.java:295)
org.apache.jasper.compiler.AntCompiler.getProject(AntCompiler.java:74)
org.apache.jasper.compiler.AntCompiler.generateClass(AntCompiler.java:129)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5 logs.
Kindly let us know the solution if anyone has encountered and solved this problem. very urgent.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021135#4021135
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021135
19Â years, 2Â months
[JBoss Seam] - How does bijetion with new object references works?
by hubaer
Hi all,
I have a question how bijection an object references works.
I have the following situation:
1. From a DataModel in overview page I outject an entry to details page.
2. From this page I outject the entry to a edit page.
3. Here I call a session bean via remote access and get a changed entry back.
If I assign this changed object to the variable in my action bean and outject it I get it on the next page correct. In my DataModel it is already the entry with the unchanged value.
So I seems to me that the object reference is not updated correctly.
Here a code fragment that only outject the entry but no update the data table reference:
| @Stateful
| @Name("userAction")
| @Scope(ScopeType.CONVERSATION)
| public class UserActionBean implements UserAction, Serializable {
|
| @In(required=true)
| @Out(required=true)
| private User user;
|
| public String refreshUser() {
| UserManager userManager = getUserManager(); // Get the remote session bean
| user = userManager.refreshUser(user);
| return "userDetails";
| }
| }
|
If I take the old entry and set the values from the changed entry I don't loose any datas.
| @Stateful
| @Name("userAction")
| @Scope(ScopeType.CONVERSATION)
| public class UserActionBean implements UserAction, Serializable {
|
| @In(required=true)
| @Out(required=true)
| private User user;
|
| public String refreshUser() {
| UserManager userManager = getUserManager(); // Get the remote session bean
| User tmpUser = userManager.refreshUser(user);
| user.setName(tmpUser.getName());
| user.setFirstName(tmpUser.getFirstName());
| // ... more set actions
| return "userDetails";
| }
| }
|
Maybe I missing something, but I thought that the reassignment of the variable should work.
Regards
Marco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021133#4021133
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021133
19Â years, 2Â months
[EJB 3.0] - EJB 3.0 Informix Sequences Jboss
by bayerwald
Hello!
I try to EJB3.0 Jboss and informix sequences to work. If I try to deploy my Entity Bean I get an error telling me that my sequence does not exists.
The first step was to find out how Jboss/Hibernate finds my sequences so I turned on SQL logging on the serverside. The Query JBoss/Hibernate started was:
select tabname, tabtype, owner, tabid from informix.systables where tabtype in
('T') and tabname like 'lagerbestaende_seq' and owner like '%'
This Query does not find my sequence because it is wrong!
I modified it (replaced tabtype T by tabtype Q) and got the expected result:
tabname lagerbestaende_seq
tabtype Q
owner informix
tabid 415
The second step was to find out how this query is created. I downloaded Hibernate and searched the sources. In ./src/org/hibernate/tool/hbm2ddl/DatabaseMetadata.java there is a method initSequences() that calls dialect.getQuerySequencesString() but in InformixDialect.java there is no getQuerySequencesString() method defined. I think this causes my problems. There should be a getQuery...() Method delivering a
SELECT statement like this:
select tabname, tabtype, owner, tabid
from systables
where tabtype in ('Q')
Is my analysis right? Is it a bug?
Regards,
Bernhard Donaubauer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4021132#4021132
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4021132
19Â years, 2Â months