[Beginners Corner] - Re: A true newbie -- Please help!
by rij
Alright, I am back.
So I tried with your persistence.xml - and it works! It's the extra information (xmlns, xsi) that did the trick because I did have the name specified in my original persistence.xml. I gotta figure out what that extra bit does.
Anyhow, moving on, I tried to run the Client. But the JVM is complaining that the class cannot be found. Now I have a question regarding this. Does the JVM look for Client.class in the EJB-JAR file or the directory where the classes had been generated and placed during compilation?
Just to refresh, my directory structure looks like this:
build.xml
src/main/java/org/rij/*.java
src/main/resources/META-INF/persistence.xml
src/main/resources/jndi.properties
target/classes/org/rij/*.class (all of the class files)
target/classes/META-INF/persistence.xml
target/mojo.jar
Also. the part of build file that runs the client is as follows:
| <target name="run.client" depends="ejbjar">
| <java classname="Client" fork="yes" dir=".">
| <classpath refid="classpath"/>
| </java>
| </target>
|
Since the classpath is important, here is the relevant part of the build file that sets the classpath.
| <property environment="env"/>
| <property name="src.dir" value="${basedir}/src/main/java"/>
| <property name="src.resources" value="${basedir}/src/main/resources"/>
| <property name="jboss.dir" value="${env.JBOSS_HOME}"/>
| <property name="jboss.deploy.dir" value="${jboss.dir}/server/default/deploy"/>
| <property name="target.dir" value="${basedir}/target"/>
| <property name="target.classes.dir" value="${basedir}/target/classes"/>
| <property name="common.lib.one" value="C:/opt/jboss-5.0.0.GA/common/lib"/>
| <property name="common.lib.two" value="C:/opt/jboss-5.0.0.GA/client"/>
|
|
|
| <!-- Next, specify where the client app is. client-config which has JNDI properties -->
| <path id="classpath">
| <fileset dir="${common.lib.one}">
| <include name="*.jar"/>
| </fileset>
| <fileset dir="${common.lib.two}">
| <include name="*.jar"/>
| </fileset>
| <pathelement location="${target.dir}"/>
| <pathelement location="${target.classes.dir}"/>
| </path>
|
The second pathelement tag shows the exact location of the class, in case the JVM looks for the class file specifically. If instead the EJB-JAR is used, then I have not explicitly mentioned that. But my assumption is that the deploy directory in default server is automatically scanned?
-Rij
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219564#4219564
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219564
17 years, 1 month
[JBoss jBPM] - spring/jbpm - custom configuration jbpm.cfg.xml
by asiletto
hi all,
I'm working on a webapp with jbpm3.1, spring2.5.5, spring-modules-jbpm31 0.8-20070311155753
it work all perfectly, now i'd like to have a custom MessageServiceFactory on jms. i've seen the JmsMessageServiceFactory which load the jms resource via jndi.
I would like to read the MessageServiceFactory from the spring context (or al least have a reference to my jmsTemplate bean configured inside spring), is there any way to do that?
I load the jbpm configuration with org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean from the file jbpm.cfg.xml
<bean id="jbpmConfiguration" class="org.springmodules.workflow.jbpm31.LocalJbpmConfigurationFactoryBean">
| <property name="sessionFactory" ref="sessionFactory"/>
| <property name="configuration" value="/WEB-INF/config/jbpm/jbpm.cfg.xml"/>
| </bean>
|
I think I've to write my custom MessageServiceFactory, but I don't know how to reference the spring context inside the implementation...
any suggestion will be appreciated
thanks ;)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219555#4219555
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219555
17 years, 1 month
[Installation, Configuration & DEPLOYMENT] - Re: A ClassCastException
by PeterJ
I notice that your are using JDK 6u10 - I have run into various strange problems when using that version. Could you try using 6u7 (if you have it) or get 6u12 (the latest) and try it.
You installed JBoss AS into a directory with spaces in its path ("jboss server"). Don't do that - spaces in the path can confuse various Java libraries. Please rename the directory to something like jboss_server.
If you still have issues, add "-verbose:class" to the JAVA_OPTS in run.bat. It is possible that you have a stray jaxb(?) JAR file being picked up somewhere. The -verbose:class option will print out the JAR file location for every class loaded - look for the two classes mentioned in the "caused by" clause:
Caused by: java.lang.ClassCastException: org.apache.xerces.parsers.StandardParserConfiguration cannot be cast to org.apache.xerces.xni.parser.XMLParserConfiguration
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4219545#4219545
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4219545
17 years, 1 month