[Installation, Configuration & DEPLOYMENT] - Re: Change DefaultDS
by PeterJ
I did exactly what you described. Well, not exactly, I think you didn't mention a few steps so I will mention them here:
1) I created a new database and user in MySQL
I see you are using the "test" database in MySQL - I recommend create a new database and setting up permissions. Here are the SQL statements I use (I run them via Ant, hence the use of '${...}' and property names):
CREATE DATABASE ${db.database};
GRANT ALL PRIVILEGES ON ${db.database}.* TO '${db.user}'@'localhost' IDENTIFIED BY '${db.password}' WITH GRANT OPTION;
2) I edited the mysql-ds.xml file to reference the database, user and password from step 1
3) I changed the jndi-name in mysql-ds.xml to DefaultDS.
4) I change the hostname in the connection URL in mysql-ds.xml to "localhost".
(Please verify that the hostname you used, server.xubuntu, is valid an reachable from the box running JBoss AS.)
5) I commented out this line in mysql-persistence-service.xml:
<!-- <depends optional-attribute-name="ChannelFactoryName">jboss.jgroups:service=ChannelFactory</depends> -->
I knew that this step had to be done in 5.0.0.GA, but for some reason I thought they would have fixed it in 5.0.1.GA so that this step was no longer necessary.
And that's it. It works for me. And my environment is:
10:33:11,862 INFO [ServerInfo] Java version: 1.6.0_13,Sun Microsystems Inc.
| 10:33:11,862 INFO [ServerInfo] Java Runtime: Java(TM) SE Runtime Environment (build 1.6.0_13-b03)
| 10:33:11,862 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 11.3-b02,Sun Microsystems Inc.
| 10:33:11,862 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224936#4224936
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224936
17 years
[EJB/JBoss] - Yet Another
by jova73
Hi,
sometimes my J2EE application, which has a stateful session bean, gets the following error trying to access the SFSB:
...
javax.ejb.EJBException: Application Error: tried to enter Stateful bean with different tx context, contextTx: ...
at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.java:262)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.StatelessSessionContainer.internalInvoke(StatelessSessionContainer.java:322)
at org.jboss.ejb.Container.invoke(Container.java:674)
at sun.reflect.GeneratedMethodAccessor54.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDispatcher.java:284)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:549)
at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:101)
at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:83)
at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:46)
at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:45)
at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:100)
...
The problem happens (at a customer site) with the application running on JBoss 3.2.1 connected to a DB2 on iSeries.
I've searched JBoss forums and the web and found several answers related to concurrent access to the SFSB from different threads, but this is not my case.
What can I check?
Should I make JBoss more verbose, in order to get more info? Which classes of JBoss should I make more verbose?
Thanks in advance,
Andrea
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224934#4224934
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224934
17 years
[JBoss Portal] - Re: URGENT - Problem when deploying on jboss portal
by PeterJ
And finally the word "Eclipse" shows up. No wonder I had no idea what you were talking about in regards to the classpath.
It appears that at this point you are fighting with Eclipse, rather than having an issue with running portlets. And yes you do need to add the portlet-api-lib.jar file to the Libraries tab on the Java Build Path for the project, otherwise Eclipse will not know about the portlet classes. However, doing so does not add the JARs to the classpath because the portlet runs within JBoss AS and not as a standalone app.
However, you do have to make certain that Eclipse does not package those JARs in your WAR file. When the WAR file is packaged, it should contain the following (based on the files you have mentioned so far):
pages/test.jsp
WEB-INF/classes/com/test/PortletDefination.class
WEB-INF/dummy-object.xml
WEB-INF/portlet-instances.xml
WEB-INF/portlet.xml
WEB-INF/web.xml
You might wonder how to convince Eclipse to generate such a WAR. I have no idea. I never compile, package or deploy anything with Eclipse - I always use Maven or Ant. This way I know what I am getting and don't have to fight with Eclipse.
As long as Eclipse places the JAR files mentioned in the Java Build Path into your WAR's WEB-INF/lib directory, it will not work. You could manually remove those JARs from the WAR before starting JBoss AS and see how that works.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4224933#4224933
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4224933
17 years