Autocommit problem in JBoss
I've created a web application using Sun Creator 2.1 and try to deploy it in JBoss 4.0.4. However, I saw the following exception:
14:33:26,329 ERROR [STDERR] java.sql.SQLException: You cannot commit with autocommit set!
14:33:26,329 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:545)
14:33:26,345 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:334)
14:33:26,345 ERROR [STDERR] at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:244)
14:33:26,345 ERROR [STDERR] at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:950)
14:33:26,345 ERROR [STDERR] at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1410)
14:33:26,345 ERROR [STDERR] at
As you can see, I used cachedrowset in my application. my data-source configuration in jboss is something like;
<local-tx-datasource> <connection-url>jdbc:microsoft:sqlserver://myserver:1433;DatabaseName=mytest;SelectMethod=Cursor</connection-url> <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<connection-property name="auto-commit">false</connection-property>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
</local-tx-datasource>
Is there a simple work-around on this problem?
Thanks.
I've created a web application using Sun Creator 2.1 and try to deploy it in JBoss 4.0.4. However, I saw the following exception:
14:33:26,329 ERROR [STDERR] java.sql.SQLException: You cannot commit with autocommit set!
14:33:26,329 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.jdbcCommit(BaseWrapperManagedConnection.java:545)
14:33:26,345 ERROR [STDERR] at org.jboss.resource.adapter.jdbc.WrappedConnection.commit(WrappedConnection.java:334)
14:33:26,345 ERROR [STDERR] at com.sun.sql.rowset.internal.CachedRowSetXReader.readData(CachedRowSetXReader.java:244)
14:33:26,345 ERROR [STDERR] at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:950)
14:33:26,345 ERROR [STDERR] at com.sun.sql.rowset.CachedRowSetXImpl.execute(CachedRowSetXImpl.java:1410)
14:33:26,345 ERROR [STDERR] at
As you can see, I used cachedrowset in my application. my data-source configuration in jboss is something like;
<local-tx-datasource> <connection-url>jdbc:microsoft:sqlserver://myserver:1433;DatabaseName=mytest;SelectMethod=Cursor</connection-url> <driver-class>com.microsoft.jdbc.sqlserver.SQLServerDriver</driver-class>
<connection-property name="auto-commit">false</connection-property>
<min-pool-size>5</min-pool-size>
<max-pool-size>20</max-pool-size>
<idle-timeout-minutes>5</idle-timeout-minutes>
</local-tx-datasource>
Is there a simple work-around on this problem?
Thanks.
Similar Messages
-
Problem with JBoss startup in a zone
Hi!
I try to run JBoss inside a sparse-root zone, but encounter a problem during startup, it simply stucks always at a certain point.
This is how the zone is configured:
root@mantis:/usr/local/Dtrace # zonecfg -z setam-test
zonecfg:setam-test> info
zonepath: /var/zone/setam-test
autoboot: true
pool:
inherit-pkg-dir:
dir: /lib
inherit-pkg-dir:
dir: /platform
inherit-pkg-dir:
dir: /sbin
inherit-pkg-dir:
dir: /usr
fs:
dir: /usr/local
special: /var/zone/setam-test
raw not specified
type: lofs
options: []
net:
address: 172.16.14.5
physical: bge0
During startup ( bin/startserver.sh ) I watch the server.log with tail -f, but here it comes: the output stopps always at the RMIAdaptor - like
2006-10-17 11:12:37,810 DEBUG [org.jboss.deployment.MainDeployer] Begin deployment start file:/opt/jboss-4.0.2/server/btv/deploy/jmx-invoker-service.xml
2006-10-17 11:12:37,811 DEBUG [org.jboss.deployment.SARDeployer] Deploying SAR, start step: url file:/opt/jboss-4.0.2/server/btv/deploy/jmx-invoker-service.xml
2006-10-17 11:12:37,811 DEBUG [org.jboss.system.ServiceController] starting service jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory
2006-10-17 11:12:37,812 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,service=proxyFactory on jboss.jmx:type=adaptor,name=Invoker
2006-10-17 11:12:37,812 DEBUG [org.jboss.system.ServiceController] starting service jboss.jmx:alias=jmx/rmi/RMIAdaptor
2006-10-17 11:12:37,812 DEBUG [org.jboss.naming.NamingAlias] Starting jboss.jmx:alias=jmx/rmi/RMIAdaptor
Here I can wait for minutes, nothing else follows. At the end I kill the java process.
I'm definitely no JBoss expert, and I wonder what RMIAdaptor does or what it expects. I assume it tries to initialize something and is not allowed to (?).
My question is: besides of truss or Dtrace, how should I diagnose this symptom at first hand?
Thanks ... NickMy colleague found the answer: he had disabled the default registration rule. Once enabled, a quick "zac reg" worked.
-
MDB Deployment Problem in JBoss 4.0.3SP1
Hi All,
I am upgrading my App Server from JBoss 323 to JBoss 403.
I had some MDBs, that are running successfully in JBoss 323.
But when I tried to redeploy them(after recompiling with jdk1.5), I am facing few issues with them.
First of all, I have a MDB whose destination was in some other Jboss server instance. That means I am trying to connect my destination "Queue" as remotely. At that time it is thorowing exception like as follows at my server startup time.......
2006-04-17 07:17:15,191 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/Server1JMSProvider
2006-04-17 07:17:15,191 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JNDIProviderAdapter@20dcb7
2006-04-17 07:17:15,191 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Creating DLQHandler
2006-04-17 07:17:15,191 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Using factory: org.jboss.mq.SpyXAConnectionFactory@1ebe8ec
2006-04-17 07:17:15,191 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Created connection: Connection@10751758[token=ConnectionToken:null/b3e21fe26fd3b44f4a0c5bb69995e669 rcvstate=STOPPED]
2006-04-17 07:17:15,472 DEBUG [org.jboss.mq.referenceable.SpyDestinationObjectFactory] SpyDestinationObjectFactory->getObjectInstance()
2006-04-17 07:17:15,488 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Using Queue: QUEUE.DLQ
2006-04-17 07:17:15,488 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Created DLQHandler
2006-04-17 07:17:15,488 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] context: javax.naming.InitialContext@106989e
2006-04-17 07:17:15,488 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] jndiSuffix: [u]xxxQueue[/u]
2006-04-17 07:17:15,488 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Got destination type Queue for LifecycleMDB
2006-04-17 07:17:15,488 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using connection factory: org.jboss.mq.SpyXAConnectionFactory@1ebe8ec
2006-04-17 07:17:15,488 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using username/password: null/null
2006-04-17 07:17:15,488 DEBUG [org.jboss.jms.ConnectionFactoryHelper] created XAQueueConnection: Connection@13605872[token=ConnectionToken:null/ea8d256e12a297e358803b37d7bfee4d rcvstate=STOPPED]
2006-04-17 07:17:15,488 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Using client id: null
2006-04-17 07:17:15,488 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Could not find the queue destination-jndi-name=queue/[u]xxxQueue[/u]
2006-04-17 07:17:15,488 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] destination not found: queue/[u]xxxQueue[/u] reason: javax.naming.NameNotFoundException: [u]xxxQueue[/u] not bound
2006-04-17 07:17:15,488 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] creating a new temporary destination: queue/[u]xxxQueue[/u]
2006-04-17 07:17:15,488 DEBUG [org.jboss.mq.server.jmx.DestinationManager] Attempting to create destination: jboss.mq.destination:service=Queue,name=xxxQueue; type=org.jboss.mq.server.jmx.Queue
2006-04-17 07:17:15,488 INFO [org.jboss.mq.server.jmx.Queue.xxxQueue] Registration is not done -> stop
2006-04-17 07:17:15,488 ERROR [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Reconnect failed: JMS provider failure detected:
org.jboss.deployment.DeploymentException: Error during queue setup; - nested throwable: (javax.management.MBeanException)
at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:39)My jboss.xml was
<jboss>
<enterprise-beans>
<message-driven>
<ejb-name>LifecycleMDB</ejb-name>
<destination-jndi-name>queue/xxxQueue</destination-jndi-name>
<invoker-bindings>
<invoker>
<invoker-proxy-binding-name>server1-message-driven-bean</invoker-proxy-binding-name>
</invoker>
</invoker-bindings>
<resource-ref>
<res-ref-name>jms/QueueFactory</res-ref-name>
<jndi-name>UIL2XAConnectionFactory</jndi-name>
</resource-ref>
</message-driven>
</enterprise-beans>
<invoker-proxy-bindings>
<invoker-proxy-binding>
<name>server1-message-driven-bean</name>
<invoker-mbean>default</invoker-mbean>
<proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
<proxy-factory-config>
<JMSProviderAdapterJNDI>Server1JMSProvider</JMSProviderAdapterJNDI>
<ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
<CreateJBossMQDestination>true</CreateJBossMQDestination>
<MaximumSize>15</MaximumSize>
<MaxMessages>1</MaxMessages>
<MDBConfig>
<ReconnectIntervalSec>10</ReconnectIntervalSec>
<DLQConfig>
<DestinationQueue>queue/DLQ</DestinationQueue>
<MaxTimesRedelivered>10</MaxTimesRedelivered>
<TimeToLive>0</TimeToLive>
</DLQConfig>
</MDBConfig>
</proxy-factory-config>
</invoker-proxy-binding>
</invoker-proxy-bindings>
</jboss>and my deployment file consist of the following code
<server>
<!-- The JMS provider loader -->
<mbean code="org.jboss.jms.jndi.JMSProviderLoader"
name="jboss.mq:service=JMSProviderLoader,name=Server1MQProvider">
<attribute name="ProviderName">Server1JMSProvider</attribute>
<attribute name="ProviderAdapterClass">
org.jboss.jms.jndi.JNDIProviderAdapter
</attribute>
<!-- The combined connection factory -->
<attribute name="FactoryRef">java:/XAConnectionFactory</attribute>
<!-- The queue connection factory -->
<attribute name="QueueFactoryRef">java:/XAConnectionFactory</attribute>
<!-- The topic factory -->
<attribute name="TopicFactoryRef">java:/XAConnectionFactory</attribute>
<!-- Uncomment to use HAJNDI to access JMS-->
<attribute name="Properties">
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://SERVER:1499
</attribute>
</mbean>
</server>Did you find a solution to this problem?
-
I have developed a small application that uses a session bean, that sets and gets a message.
If a run the application inside JBuilderX it works just find, but when a create a jar file, only the interface shows up, but the application doesn't communicate with the session bean. I've checked that the application server was running (I'm using JBoss 3.2.5).
The jar file contains all the .class files of my project and the jar files that are in the client directory of JBoss.
I have found that the problem is that the client cannot access the jndi service.
The client code is:
public void initialize() {
try {
Context context = getInitialContext();
Object ref = context.lookup("BeanSesion1");
beanSesion1Home = (BeanSesion1Home) PortableRemoteObject.narrow(ref, BeanSesion1Home.class);
catch(NamingException e) {
e.printStackTrace();
private Context getInitialContext() throws NamingException {
Hashtable environment = new Hashtable();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
environment.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
environment.put(Context.PROVIDER_URL, "jnp://localhost:1099");
return new InitialContext(environment);
The exception NamingException is thrown. It seems that the client cannot found "org.jnp.interfaces.NamingContextFactory", "org.jboss.naming:org.jnp.interfaces" and "jnp://localhost:1099"
(I'm running JBoss server in the same machine I intend to run the client)
I have also tried not to set an initial context with properties. Instead I wrote a jndi.properties file that contains the following
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://localhost:1099
and put it in the application classpath (for example C:\JBUILDERX\JDK1.4\bin\java -classpath "C:\JBuilderX\proyects\BeanSession\classes;c:\tmp;" beansession.Application
(jndi.properties is in c:\tmp)
This didn't work either.
Does anybody know where the problem is?
thanksYou need to have the foolowing file in your classpath too:
c:\jboss-3.2.?\client\jbossall-client.jar -
Struts message-resource problems in jboss
Hi,
I'm fairly new to jsp/servlets and I'm trying to use the struts framework.
I have a html file with the struts bean taglib defined and the following line :
<bean:message key="index.title" />
In struts-config.xml I have the following :
<message-resources parameter="MyAppResources" />
And I put MyAppResources.properties in WEB-INF/classes
I then add the files to myapp.war and deploy it in jboss, but when I try to load the page I get the following exception :
javax.servlet.ServletException: Cannot find message resources under key org.apache.struts.action.MESSAGE
Any help would be greatly appreciated!!!and if, after deploying, you delete the war file? Does it work then?
Problem seems to be that in a war file the directories arent as the class loader expects them, I think. -
Hi,
I trying to learng EJB and I use JBoss Application Server as my EJB container.
I installed it online using JNLP from www.jboss.org the version is 4.0.3.
But the problem is that I can't start the server whenever I click "run.bat".
The resulting console window shows the following error.
Could not locate C:\Program Files\Java\jdk1.5.0_05;\lib\tools.jar. Unexpected re
sults may occur.
Make sure that JAVA_HOME points to a JDK and not a JRE.
===============================================================================
JBoss Bootstrap Environment
JBOSS_HOME: C:\Program Files\jboss-4.0.3\bin\\..
JAVA: C:\Program Files\Java\jdk1.5.0_05;\bin\java
JAVA_OPTS: -Dprogram.name=run.bat -Xms128m -Xmx512m
CLASSPATH: C:\Program Files\Java\jdk1.5.0_05;\lib\tools.jar;C:\Program Files\j
boss-4.0.3\bin\\run.jar
===============================================================================
The system cannot find the path specified.
Press any key to continue . . .
I have set the environment variables like JAVA_HOME properly but I am still having this problem.
Please help.
ByeThank's man I removed it and the server is running.
Thank's a lot. . . . -
Hello I know its silly question but I am new in this technology and I have problem with deploying my EJB in JBoss.
I have 3 classes :
org.ejb.wybory.Model.class - Remote Interface
org.ejb.wybory.ModelHome.class - Home Interface
org.ejb.wybory.ModelBean.class - EJB
and I have 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>
<enterprise-beans>
Dane
<display-name>Model</display-name>
<ejb-name>ModelEJB</ejb-name>
org.ejb.wybory.ModelHome
org.ejb.wybory.Model
<ejb-class>org.ejb.wybory.ModelBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</enterprise-beans>
</ejb-jar>
I packed it :
jar -cvf wybory.jar Meta-Inf org/ejb/wybory/*.class
and copy wybory jar into \jboss-4.0.1\server\all\deploy
and it thoes not work :(
what did I do wrong?
Thx
WaglikPlease post the deployment errors.
Modify the meta-inf dir to
META-INF -
A Problem with JBoss Application
We have got a dedicated server to run our J2EE application.
I installed JBoss Server version 3.2.2 on the server and
deployed the web application(.war) in it. I can access the
web application when I remotely login to the server, and type
this URL in the browser (on the remote server machince):
http://localhost:8080/[WEB_APPLICATION]
http://[Dedicated_Server_IP]:8080/[WEB_APPLICATION]
However, I get error when I try this URL on my local workstation
or from any other workstation other than that of our dedicated
server.
http://[Dedicated_Server_IP]:8080/[WEB_APPLICATION]
Any idea what can be the reason for this problem? Any help
from any corner of the universe will be appreciated.
Umerset the Request method to POSTI didn't tell you to do that. I asked you whether you should be doing that. Not the same thing. Maybe you should be setting it ti "PUT". I don't know. Only you can know.
String stringToReverse = URLEncoder.encode(request, "UTF-8") ;What's that for? You aren't using it anywhere.
connection.setRequestProperty("Content-Length", Integer.toString(request.length()));Don't do that. URLConnection will do that for you, and do it better.
for (int i = 0; i < request.length(); ++i) {
out.write(request.charAt(i));
System.out.println(i);
}Change all that to out.write(request);
If this is a post, surely there should be an argument name somewhere too? (NB again I am not hereby saying that it is a post: I'm just telling you the consequence.)
After that, you need to get the response code and read the input of the connection. Are you doing that?
In short I don't think you understand exactly what your output should be. Do you have a specification? -
JSF problem in JBoss Portal Server 2.6.0-CR2
In JBoss Portal Server the default page will display all portlets you create by default. The portlet in question, developed using Java Studio Creator, works perfectly on the default page. However, once included in a page on the "dashboard", it no longer functions correctly. Text fields get inexplicably cleared, buttons do not get enabled as they should, and a selection in a drop down list box actually invokes the code for a button click.
Any help understanding what is going on here would be highly appreciated.
NilsHi,
I am finding following error in your log:
MsSClientHandle: no server provides service ENQ (4), requested from gmsc2_DBM_00 http://msxxserv_mt. 4669
UPD 0 0 2000 0 0
--------++++--
+
ENQ 0 0 2000 0 0
--------++++--
+
BTC 0 0 2000 0 0
--------++++--
+
SPO 0 0 2000 0 0
--------++++--
+
UP2 0 0 2000 0 0
Please assign no. of work processes to at least 1 for above mentioned type of work process. -
Very strange index.jsp problem (Apache2 + Jboss/Tomcat)
I've been working on this for 6 hours until the current time of 4.30 am - any help is very much appreciated.
I (thought) I had successfully integrated Jboss/Tomcat with apache 2 using mod_jk 1.2.8 - and added an alias for jmx-console. But I just can't make index.jsp serve when loading the default directory. I also tried with a fairly straightforward jsp site I have 'ConnectSite' (just a conference name).
I have created deployment and alias called connect, results
http://localhost:8080/ConnectSite [success]
http://localhost/ConnectSite/index.jsp [success]
http://localhost/ConnectSite/ [fail] - Apache treats it like any other directory.
But what's really strange is if i take out mod_jk from apache and leave in DirectoryIndex index.jsp - then apache will serve the .jsp file unprocessed. All the static content is served by apache just fine.
I am baffled. Should I just try proxy for the moment.
Many Thanks,
-Mike D
Config files -
Apache section (Have of course added DirectoryIndex index.jsp)
LoadModule jk_module /usr/local/apache2/modules/mod_jk.so
<IfModule mod_jk.c>
JkWorkersFile /usr/local/apache2/workers.properties
JkLogFile /usr/local/apache2/logs/mod_jk.log
JkLogLevel error
JkOptions +ForwardDirectories
DirectoryIndex index.jsp
# JkAutoAlias /usr/java/jboss/server/default/deploy
# send all requests ending in .jsp to worker1
JkMount /*.jsp foo
# send all requests ending /servlet to worker1
JkMount /*/servlet/ foo
</IfModule>
(running apachectl configtest returns syntax OK)
workers.properties ...
# Tomcat and Java configuration
workers.tomcat_home=/usr/java/jboss/server/default/deploy/jbossweb-tomcat50.sar
workers.java_home=/usr/java/jdk
ps=/
worker.list=foo
# Definition for local worker using AJP 1.3
worker.foo.type=ajp13
worker.foo.host=localhost
worker.foo.port=8009
worker.foo.cachesize=20Workaround for anyone interested:
In apache conf:
use JkMount /ContextName/ to explicitly send each directory with index.jsp to Tomcat -
Web service deployment problem in jboss
How portals are deloyed inweb-server
Have you found a solution for this error?
One way to fix it is to use rpc literal instead of document literal, however, I would like to use document literal and it seems to cause this problem...
T. -
Deployement problem in jboss for rar
Hi all,
I may be wrong to post this messsage in this form, sorry. I am new to JCA. I tried to deploy the hello world rar (ibm example for jca) in jboss but it failed, the following is the execption i am getting at the time of deployement
14:19:40,953 ERROR [MainDeployer] Could not initialise deployment: file:/C:/jbos
s-4.0.0RC1/server/default/deploy/hw-ds.xml
org.jboss.deployment.DeploymentException: Could not parse dd; - nested throwable
: (org.xml.sax.SAXParseException: A pseudo attribute name is expected. )
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:255)
at org.jboss.deployment.XSLSubDeployer.init(XSLSubDeployer.java:188)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:727)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:664)
at org.jboss.deployment.MainDeployer.addDeployer(MainDeployer.java:267)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
Incompletely deployed packages:
org.jboss.deployment.DeploymentInfo@4b279edb { url=file:/C:/jboss-4.0.0RC1/serve
r/default/deploy/hw-ds.xml }
deployer: org.jboss.deployment.XSLSubDeployer@178655
status: null
state: FAILED
watch: file:/C:/jboss-4.0.0RC1/server/default/deploy/hw-ds.xml
altDD: null
lastDeployed: 1124959780953
lastModified: 1124959779093
mbeans:
What i did was
1. created/compiled all the class files (Connection, ConnectionFactory, Records....)
2. created the jar file hw.jar
3. created deployement descriptor META-INF/ra.xml
4. created the rar file hw.rar
5. created hw-ds.xml (i may miss some thing in this file deployment sepcfic to jboss)
<?xml version="1.0" encoding="UTF-8">
<connection-factories>
<no-tx-connection-factory>
<jndi-name>HW</jndi-name>
<rar-name>hw.rar</rar-name>
<connection-definition>
javax.resource.cci.ConnectionFactory
</connection-definition>
</no-tx-connection-factory>
</connection-factories>
i may miss something in this file... please help me what i am missing to run this application
thanks in advance
baijuHi Baiju,
Give a chance to add a final question mark ("?") in the first line of your xml datasource definition file, like this:
<?xml version="1.0" encoding="UTF-8"?>
HTH,
-Brice. -
Authentication problem on JBOSS. Need help!
I use jboss 3.0.3.
My "auth.conf" file is:
simple {
org.jboss.security.ClientLoginModule required
password-stacking="useFirstPass"
Application policy in "login-config.xml" is
<application-policy name="admin">
<authentication>
<login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required">
<module-option name="unauthenticatedIdentity">guest</module-option>
</login-module>
</authentication>
</application-policy>
My "jboss.xml" is :
<jboss>
<enterprise-beans>
<entity>
<ejb-name>Sec1</ejb-name>
<jndi-name>Sec1Remote</jndi-name>
</entity>
</enterprise-beans>
<security-domain>java:/jaas/admin</security-domain>
</jboss>
File "users.properties" is :
alexander=aaa
File "roles.properties" is :
alexander=admin
Client code is :
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, "localhost:1099");//app server url
properties.put(Context.SECURITY_PRINCIPAL, "admin");
properties.put(Context.SECURITY_CREDENTIALS, "aaa");
InitialContext ctx = new InitialContext(properties);
Object ref = ctx.lookup("Sec1Remote");
Sec1RemoteHome sec1RemoteHome = (Sec1RemoteHome) PortableRemoteObject.narrow(ref, Sec1RemoteHome.class);
Sec1Remote sec1Remote = sec1RemoteHome.findByPrimaryKey("1");
System.out.println(sec1Remote.getName());
My "ejb-jar.xml" is:
<ejb-jar>
<enterprise-beans>
<entity>
<display-name>sec1</display-name>
<ejb-name>Sec1</ejb-name>
<home>untitled2.Sec1RemoteHome</home>
<remote>untitled2.Sec1Remote</remote>
<ejb-class>untitled2.Sec1Bean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<abstract-schema-name>Enterprise1</abstract-schema-name>
<env-entry>
<description />
<env-entry-name>eee</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>rrr</env-entry-value>
</env-entry>
<security-role-ref>
<description />
<role-name>admin</role-name>
<role-link>admin</role-link>
</security-role-ref>
<security-identity>
<description>aaa</description>
<use-caller-identity />
</security-identity>
</entity>
</enterprise-beans>
<assembly-descriptor>
<security-role>
<description>admin</description>
<role-name>admin</role-name>
</security-role>
<security-role>
<description>System Manager</description>
<role-name>manager</role-name>
</security-role>
<method-permission>
<role-name>admin</role-name>
<method>
<description />
<ejb-name>Sec1</ejb-name>
<method-intf>Remote</method-intf>
<method-name>getName</method-name>
<method-params />
</method>
</method-permission>
<method-permission>
<unchecked />
<method>
<description />
<ejb-name>Sec1</ejb-name>
<method-intf>Home</method-intf>
<method-name>findByPrimaryKey</method-name>
<method-params>
<method-param>java.lang.String</method-param>
</method-params>
</method>
</method-permission>
<container-transaction>
<method>
<ejb-name>Sec1</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
When I try to run client's program, an error appeares:
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.ServerException: EJBException:; nested exception is:
javax.ejb.EJBException: checkSecurityAssociation; CausedByException is:
Insufficient method permissions, principal=null, method=getName, interface=REMOTE, requiredRoles=[admin], principalRoles=[]
I have no ideas, why it appeares? What's wrong?
Help me, please... :(easy... your principal should be alexander, not admin
-
Hi ,
I am able to successfully deploy the .ear file in Jboss ..but when i try to call the Entity Bean ...i get the following Exception on JBoss Server Console :
18:15:42,595 INFO [STDOUT] javax.ejb.CreateException: Error checking if entity exists:com.sybase.jdbc2.jdbc.SybSQLException: Incorrect syntax near 'WHERE'.
This is giving me a lot of pain ..can anyone suggest me is something i am missing ?
I would appreciate for Ur feedback .
Thankstopic"virtual routing network emulation framework"http://www.google.com/search?q=virtual+routing+network+emulation+framework&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official
-
Problem debugging jboss with Jdeveloper
I have server side project builed by jboss , I use JDEveloper. I wont to debug this project or run jboss through jdeveloper, I can't do it.
How can I do it?I don't think JDev is able to debug with other application server. I can't see any server settings except embedded oc4j. you can only debug your application with embedded oc4j which JDev has. but you can create deployment profile for other server such as weblogic, jboss, and tomcat with JDev.
-correct me if i'm wrong, thanks-
Maybe you are looking for
-
Keyboard set up will not accept code
I am setting up my Mac mini for the first time. The track pad set up okay but when trying to set up the keyboard it shows the code but keeps cycling back to the code again and again, never accepting it. Does any one know what to do?
-
MR21+COMPUTE_BCD_OVERFLOW
Hi We are encountering a dump due to the exception COMPUTE_BCD_OVERFLOW in MR21 during the Price Change.When debugged MR21>>Function Module PRICES_CHANGE>>Function module MR_POSITING_GENERATE>>Sub routin OIA_CALC_LOG_INV>> G_LIVAL = I_SGNBU-NPREI * O
-
I've created an .swf from Flash, and am attempting to include it in the presentation I'm building in MenuBuilder. The project will ultimately go on a CD and I don't want an Internet connection mandatory to view the presentation - so I need everything
-
How can I regain control of .bash_profile after making changes to $PATH?
Hi, Today, I installed Android ADB on my MBP (late 2013) and used the following guide to get it started: http://www.droidviews.com/a-comprehensive-guide-to-adb-android-debug-bridge-and- commands/ - that guide said I should make a change to ~/bash_pro
-
Need HELP with finally() in nested try-catch
hi, i am having trouble with deadlock and wondering if its due to an incorrect use of finally nested within multiple try catch blocks. is the inner finally() required, will the outer one get executed, or will the two finally() statements get executed