[JBoss Seam] - Re: Query Logging?
by peteroyle
Hi ptmain,
I'm not sure about the SELECT/INSERT/UPDATE or the package level stuff, but I think I've read in docs about how to turn full sql logging on and off. Mind you I've never actually tried it, so anyone with actual experience in this is welcome to correct me :)
Anyway, since we're using hibernate and EJB I think you can set the following property in your persistence.xml (after jta-data-source):
| <properties>
| ...
| <property name="hibernate.show_sql" value="true"/>
| ...
| </properties>
|
According to the Hibernate documentation regarding this property:
anonymous wrote :
| This is an alternative to setting the log category org.hibernate.SQL to debug.
|
Hope that works!
Pete.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961654#3961654
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961654
19 years, 9 months
[Beginners Corner] - comp not bound
by raysonliu
Hi,
I've been trying the following project on Jboss ( initially from SUN J2EE tutorial ). Depolyment of EJB to Jboss is ok, but when I try the ConverterClient, I got the following error:
Caught an unexpected exception!
javax.naming.NameNotFoundException: comp not bound
at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
...
-------------------------- Source Code start ---------------
Converter.java
|
| package converter;
|
| import javax.ejb.EJBObject;
| import java.rmi.RemoteException;
| import java.math.*;
|
| public interface Converter extends EJBObject {
| public BigDecimal dollarToYen(BigDecimal dollars) throws RemoteException;
|
| public BigDecimal yenToEuro(BigDecimal yen) throws RemoteException;
| }
|
|
ConverterHome.java
| package converter;
|
| import java.rmi.RemoteException;
| import javax.ejb.CreateException;
| import javax.ejb.EJBHome;
|
| public interface ConverterHome extends EJBHome {
| Converter create() throws RemoteException, CreateException;
| }
|
|
ConverterBean.java
| package converter;
|
| import java.rmi.RemoteException;
| import javax.ejb.SessionBean;
| import javax.ejb.SessionContext;
| import java.math.*;
|
| public class ConverterBean implements SessionBean {
| BigDecimal yenRate = new BigDecimal("121.6000");
| BigDecimal euroRate = new BigDecimal("0.0077");
|
| public BigDecimal dollarToYen(BigDecimal dollars) {
| BigDecimal result = dollars.multiply(yenRate);
| return result.setScale(2,BigDecimal.ROUND_UP);
| }
|
| public BigDecimal yenToEuro(BigDecimal yen) {
| BigDecimal result = yen.multiply(euroRate);
| return result.setScale(2,BigDecimal.ROUND_UP);
| }
|
| public ConverterBean() {}
| public void ejbCreate() {}
| public void ejbPostCreate() {}
| public void ejbRemove() {}
| public void ejbActivate() {}
| public void ejbPassivate() {}
| public void setSessionContext(SessionContext sc) {}
| }
|
|
ConverbeanHome.java
|
| package converter;
|
| public interface ConverterBeanHome
| extends javax.ejb.EJBHome
| {
| public static final String COMP_NAME="java:comp/env/ejb/ConverterBean";
| public static final String JNDI_NAME="ejb/ConverterBean";
|
| public converter.ConverterBean create()
| throws javax.ejb.CreateException,java.rmi.RemoteException;
|
| }
|
ejb-jar.xml
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
|
| <ejb-jar >
|
| <description><![CDATA[No Description.]]></description>
| <display-name>Generated by XDoclet</display-name>
|
| <enterprise-beans>
|
| <!-- Session Beans -->
| <session >
| <description><![CDATA[Description for test]]></description>
| <display-name>Name for test</display-name>
|
| <ejb-name>ConverterBean</ejb-name>
|
| <home>converter.ConverterHome</home>
| <remote>converter.Converter</remote>
| <ejb-class>converter.ConverterBean</ejb-class>
| <session-type>Stateless</session-type>
| <transaction-type>Container</transaction-type>
|
| </session>
| </enterprise-beans>
|
| </ejb-jar>
|
jboss.xml
| <?xml version="1.0" encoding="UTF-8"?>
| <!DOCTYPE jboss PUBLIC "-//JBoss//DTD JBOSS 4.0//EN" "http://www.jboss.org/j2ee/dtd/jboss_4_0.dtd">
|
| <jboss>
| <enterprise-beans>
| <session>
| <ejb-name>ConverterBean</ejb-name>
| <jndi-name>ejb/ConverterBean</jndi-name>
|
| <method-attributes>
| </method-attributes>
| </session>
| </enterprise-beans>
| </jboss>
|
ConverterClient.java
|
| import converter.Converter;
| import converter.ConverterHome;
| import javax.naming.Context;
| import javax.naming.InitialContext;
| import javax.rmi.PortableRemoteObject;
| import java.math.BigDecimal;
|
|
|
| public class ConverterClient {
| public static void main(String[] args) {
| try {
| Context initial = new InitialContext();
| Context myEnv = (Context) initial.lookup("java:comp/env");
| Object objref = myEnv.lookup("ejb/ConverterBean");
|
| ConverterHome home =
| (ConverterHome) PortableRemoteObject.narrow(objref,
| ConverterHome.class);
|
| Converter currencyConverter = home.create();
|
| BigDecimal param = new BigDecimal("100.00");
| BigDecimal amount = currencyConverter.dollarToYen(param);
|
| System.out.println(amount);
| amount = currencyConverter.yenToEuro(param);
| System.out.println(amount);
|
| System.exit(0);
| } catch (Exception ex) {
| System.err.println("Caught an unexpected exception!");
| ex.printStackTrace();
| }
| }
| }
|
-------------------------- Source Code end ---------------
Anybody please help, thanks a lot in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961649#3961649
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961649
19 years, 9 months
[Management, JMX/JBoss] - Re: start not being call on 4.0.2 startup
by acxsjones
I made a simple test and still can not get start to be called. So I guess I am missing something. I will post my example.
| package com.acxiom.test;
|
| import org.jboss.system.ServiceMBeanSupport;
|
| public class Test extends ServiceMBeanSupport implements TestMBean {
|
| private String attr1;
|
| public String getAttr1() {
| return attr1;
| }
|
| public void setAttr1(String att1) {
| this.attr1 = att1;
|
| }
|
| public void start() throws Exception {
| System.out.println("INSIDE START");
|
| }
|
| public void create() throws Exception {
| System.out.println("INSIDE CREATE");
|
|
| }
|
| }
configuration
<?xml version="1.0" encoding="UTF-8"?>
|
| <server>
| <classpath codebase="deploy" archives="test.jar"/>
| <mbean code="com.acxiom.test.Test"
| name="com.acxiom.test:service=Test" >
| <attribute name="Attr1">Value for Attr1</attribute>
|
| </mbean>
|
| </server>
I am deploying a jar file in the deploy directory and the test-service.xml in the deploy directory.
Below is the server.log output
2006-07-28 16:13:33,659 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,659 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,659 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml -> C:\jboss-4.0.2\server\default\tmp\deploy\tmp47542Test-service.xml
| 2006-07-28 16:13:33,659 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.SARDeployer@1833eca
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] Found classpath element: [classpath: null]
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] codebase URL is file:/C:/jboss-4.0.2/server/default/deploy/
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] listing codebase for archives matching test.jar
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] URLLister class is org.jboss.net.protocol.file.FileURLLister
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] deployed classes for file:/C:/jboss-4.0.2/server/default/deploy/test.jar
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] about to copy 0 local directories
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] looking for nested deployments in : file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.DeploymentInfo] createLoaderRepository from config: LoaderRepositoryConfig(repositoryName: JMImplementation:name=Default,service=LoaderRepository, repositoryClassName: null, configParserClassName: null, repositoryConfig: null)
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.mx.loading.UnifiedClassLoader] New jmx UCL with url file:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp47542Test-service.xml
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@1ab28fe, cl=org.jboss.mx.loading.UnifiedClassLoader3@aefcbb{ url=file:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp47542Test-service.xml ,addedOrder=0}
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, repository=org.jboss.mx.loading.UnifiedLoaderRepository3@1ab28fe, cl=org.jboss.mx.loading.UnifiedClassLoader3@aefcbb{ url=file:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp47542Test-service.xml ,addedOrder=0}
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.mx.loading.UnifiedLoaderRepository3] Adding org.jboss.mx.loading.UnifiedClassLoader3@aefcbb{ url=file:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp47542Test-service.xml ,addedOrder=0}
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] Added url: file:/C:/jboss-4.0.2/server/default/deploy/test.jar, to ucl: org.jboss.mx.loading.UnifiedClassLoader3@aefcbb{ url=file:/C:/jboss-4.0.2/server/default/tmp/deploy/tmp47542Test-service.xml ,addedOrder=14}
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.MainDeployer] found 0 subpackages of file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.MainDeployer] Watching new file: file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.MainDeployer] create step for deployment file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, create step: url file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,669 DEBUG [org.jboss.deployment.SARDeployer] Registering service UCL=jmx.loading:UCL=aefcbb
| 2006-07-28 16:13:33,679 DEBUG [org.jboss.system.ServiceCreator] About to create bean: com.acxiom.test:service=Test with code: com.acxiom.test.Test
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.system.ServiceCreator] Created bean: com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.system.ServiceConfigurator] Attr1 set to Value for Attr1 in com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.system.ServiceController] Creating service com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [com.acxiom.test.Test] Creating com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [com.acxiom.test.Test] Created com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.system.ServiceController] Creating dependent components for: com.acxiom.test:service=Test dependents are: []
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.deployment.MainDeployer] Done with create step of deploying Test-service.xml
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, start step: url file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.system.ServiceController] starting service com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [com.acxiom.test.Test] Starting com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [com.acxiom.test.Test] Started com.acxiom.test:service=Test
| 2006-07-28 16:13:33,689 DEBUG [org.jboss.system.ServiceController] Starting dependent components for: com.acxiom.test:service=Test dependent components: []
| 2006-07-28 16:13:33,699 DEBUG [org.jboss.deployment.MainDeployer] End deployment start on package: Test-service.xml
| 2006-07-28 16:13:33,699 DEBUG [org.jboss.deployment.MainDeployer] Deployed package: file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,699 DEBUG [org.jboss.deployment.scanner.URLDeploymentScanner] Watch URL for: file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml -> file:/C:/jboss-4.0.2/server/default/deploy/Test-service.xml
| 2006-07-28 16:13:33,709 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment of package: file:/C:/jboss-4.0.2/server/default/deploy/cache-invalidation-service.xml
| 2006-07-28 16:13:33,709 DEBUG [org.jboss.deployment.MainDeployer] Starting deployment (init step) of package at: file:/C:/jboss-4.0.2/server/default/deploy/cache-invalidation-service.xml
| 2006-07-28 16:13:33,709 DEBUG [org.jboss.deployment.MainDeployer] Copying file:/C:/jboss-4.0.2/server/default/deploy/cache-invalidation-service.xml -> C:\jboss-4.0.2\server\default\tmp\deploy\tmp47543cache-invalidation-service.xml
| 2006-07-28 16:13:33,709 DEBUG [org.jboss.deployment.MainDeployer] using deployer org.jboss.deployment.SARDeployer@1833eca
| 2006-07-28 16:13:33,719 DEBUG [org.jboss.deployment.SARDeployer] about to copy 0 local directories
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961647#3961647
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961647
19 years, 9 months
[JCA/JBoss] - Can't connect to global namespace datasource from servlet
by LostJBossIdeUser
I just recently started playing with JBoss. I have been successful so far. But now I am stuck on a datasource issue. I need to access a MySQL DB from a servlet to read/write xml content.
Here is what I have so far:
mysql-ds.xml -
<local-tx-datasource>
<jndi-name>jdbc/MySqlDS</jndi-name>
<use-java-context>false</use-java-context>
<connection-url>jdbc:mysql://localhost:3306/proxyServletDB</connection-url>
<driver-class>com.mysql.jdbc.Driver</driver-class>
<user-name>root</user-name>
pword
<exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter</exception-sorter-class-name>
<type-mapping>mySQL</type-mapping>
</local-tx-datasource>
web.xml -
<web-app>
<!-- JDBC DataSources (java:comp/env/jdbc) -->
<resource-ref>
The default DS
<res-ref-name>jdbc/MySqlDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
< ... >
</web-app>
jboss-web.xml -
<jboss-web>
<resource-ref>
<res-ref-name>jdbc/MySqlDS</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<jndi-name>java:/MySqlDS</jndi-name>
</resource-ref>
</jboss-web>
Servlet -
Context ctx = new InitialContext();
DataSource ds = (DataSource)ctx.lookup("java:/comp/env/jdbc/MySqlDS");
I think these are the relevant files. I could access the datasource from the local jndi namespace by using lookup("java:/jdbc/MySqlDS"). But I need it to be global so that other servlets, from other machines can use it. Which is when I added: <use-java-context>false</use-java-context> to my mysql-ds.xml file so that the default, local java:/ namespace won't be used.
But now whenever the servlet is invoked I get the error that says MySqlDS not bound (complete trace shown below).
Error I get when I try to invoke the servlet :
16:34:47,328 ERROR [STDERR] javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.N
ameNotFoundException: MySqlDS not bound]
16:34:47,328 ERROR [STDERR] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1067)
16:34:47,328 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:700)
16:34:47,328 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:716)
16:34:47,328 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
16:34:47,328 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
16:34:47,328 ERROR [STDERR] at ReadServlet.doGet(ReadServlet.java:28)
16:34:47,328 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
16:34:47,328 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
16:34:47,328 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
in.java:252)
16:34:47,328 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
173)
16:34:47,328 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
16:34:47,328 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
in.java:202)
16:34:47,328 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
173)
16:34:47,343 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
16:34:47,343 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
16:34:47,343 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValv
e.java:175)
16:34:47,343 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
16:34:47,343 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
16:34:47,343 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
16:34:47,343 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
16:34:47,343 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
16:34:47,343 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
16:34:47,343 ERROR [STDERR] at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
(Http11BaseProtocol.java:664)
16:34:47,343 ERROR [STDERR] at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
16:34:47,343 ERROR [STDERR] at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:1
12)
16:34:47,343 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
16:34:47,343 ERROR [STDERR] Caused by: javax.naming.NameNotFoundException: MySqlDS not bound
16:34:47,343 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)
16:34:47,343 ERROR [STDERR] at org.jnp.server.NamingServer.getBinding(NamingServer.java:537)
16:34:47,343 ERROR [STDERR] at org.jnp.server.NamingServer.getObject(NamingServer.java:543)
16:34:47,343 ERROR [STDERR] at org.jnp.server.NamingServer.lookup(NamingServer.java:296)
16:34:47,343 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:625)
16:34:47,343 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:587)
16:34:47,343 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
16:34:47,343 ERROR [STDERR] at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1061)
16:34:47,343 ERROR [STDERR] ... 25 more
service=jndiview -
Global JNDI Namespace
+- jdbc (class: org.jnp.interfaces.NamingContext)
| +- MySqlDS (class: javax.sql.DataSource)
Any ideas/suggestions? I?ve been stuck on this thing for almost 3 days now.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961645#3961645
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961645
19 years, 9 months
[JBoss Seam] - Cannot Deploy the JBoss Seam Examples ( getting Deployment E
by klsateesh
Hi All,
I installed JBoss4.0.4 and Started working on Seam Examples and i was able to deploy and test the examples initially..
I developed a Sample app (under /examples/remoting)and when i tried deploying it i am getting the following Exception
| 16:52:16,279 ERROR [MainDeployer] Could not create deployment: file:/D:/Projects/Sample/Jboss4.0.4/server/default/tmp/deplo
| y/tmp12863jboss-seam-registration.ear-contents/jboss-seam.jar-contents/booking-ds.xml
| org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=LocalTxCM,nam
| e=bookingDatasource
| at org.jboss.system.ServiceCreator.install(ServiceCreator.java:103)
| at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:449)
| at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:171)
| at org.jboss.system.ServiceController.install(ServiceController.java:226)
| at sun.reflect.GeneratedMethodAccessor15.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy4.install(Unknown Source)
| at org.jboss.deployment.SARDeployer.create(SARDeployer.java:249)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy25.create(Unknown Source)
| at org.jboss.deployment.XSLSubDeployer.create(XSLSubDeployer.java:192)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
| at org.jboss.deployment.MainDeployer.create(MainDeployer.java:943)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
| at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
| at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
| at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
| at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
| at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
| at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
| at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
| at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
| at $Proxy6.deploy(Unknown Source)
| at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
| at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:26
| 3)
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
|
| at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
|
The Sample App i tried is using a Slider Control with remoting capabilities.
Here is the sample.xhtml i am using
| <body>
|
| <script type="text/javascript" src="seam/remoting/resource/remote.js">
| <!--
| // This space intentionally left blank
| //-->
| </script>
|
| <script type="text/javascript" src="seam/remoting/interface.js?dpaRemoteSlider">
| <!--
| // This space intentionally left blank
| //-->
| </script>
| <script type='text/javascript' src='scripts/slider.js'></script>
| <link rel="stylesheet" type="text/css" href="style/slider.css" />
|
| <script type="text/javascript">
| //<![CDATA[
|
| Seam.Remoting.setDebug(true);
|
| function sendData() {
| value = document.getElementById("channelRedYellowGreen").value;
| Seam.Component.getInstance("dpaRemoteSlider").getMessage(value, sliderCallback);
| }
| function sliderCallback(result) {
| alert(result);
| }
| function mouseUpDone(){
| // TODO : Write the Logic to connect to the Server if you need
| //alert("Here in mouseUpDone "+document.currentSlider.valueX);
| sendData();
| return;
| }
| // ]]>
| </script>
| Welcome to Digital Preservation Archives.
|
| <input id="channelRedYellowGreen" name="channelRedYellowGreen" class="slider" type="text" value="0" />
| <div id="datalog" style="border: 1px solid black;"></div>
|
| </body>
|
My application.xml is listed below
| <application>
| <display-name>Seam Remoting Sample</display-name>
| <module>
| <web>
| <web-uri>seam-sample.war</web-uri>
| <context-root>/seam-sample</context-root>
| </web>
| </module>
| <module>
| <ejb>seam-sample.jar</ejb>
| </module>
| <module>
| <java>jboss-seam.jar</java>
| </module>
| </application>
|
|
jboss-app.xml :
| <jboss-app>
| <loader-repository>
| seam.jboss.org:loader=seam-dpa
| </loader-repository>
| </jboss-app>
|
I am using the Session Bean
|
| package com.test..simple.remote.slider;
|
| import javax.ejb.Stateless;
| import javax.interceptor.Interceptors;
|
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.ejb.SeamInterceptor;
|
| @Stateless
| @Name("sampleRemoteSlider")
| @Interceptors(SeamInterceptor.class)
| public class SampleRemoteSlider implements SampleRemoteSliderLocal {
|
| public String getMessage(String strValue) {
| return "Selected the Value " + strValue;
| }
| }
|
My JNDI View is as shown below..
| java: Namespace
|
| +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)
| +- DefaultDS (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
| +- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
| +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
| +- comp (class: javax.naming.Context)
| +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
| +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)
| +- jaas (class: javax.naming.Context)
| | +- HsqlDbRealm (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- jmx-console (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)
| | +- JmsXARealm (class: org.jboss.security.plugins.SecurityDomainContext)
| +- timedCacheFactory (class: javax.naming.Context)
| Failed to lookup: timedCacheFactory, errmsg=org.jboss.util.TimedCachePolicy
| +- TransactionPropagationContextExporter (class: org.jboss.tm.TransactionPropagationContextFactory)
| +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)
| +- Mail (class: javax.mail.Session)
| +- comp.ejb3 (class: javax.naming.Context)
| | NonContext: null
| +- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
| +- TransactionManager (class: org.jboss.tm.TxManager)
| +- bookingDatasource (class: org.jboss.resource.adapter.jdbc.WrapperDataSource)
|
|
Now i cannot deploy other examples which comes with Seam.
I tried unregistering ( invoked the destroy() method on name=bookingDatasource,service=LocalTxCM and even after that i am getting the same error..
Why the booking-ds.xml is placed in the jboss-seam.jar File ??
Pls let me know hot to resolve this..
Thanks
Sateesh
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3961644#3961644
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3961644
19 years, 9 months