[JBoss Messaging] - -b 0.0.0.0 is behaving one way on Test machine and another w
by rdaly
I have installed jboss-4.2.2.GA with jboss-messaging-1.4.0.SP3 on a test server and a qa server. Both servers run the same version of Linux (Red Hat Enterprise Linux WS release 3 (Taroon Update 9)). Both are also running the same version of Java (IBM J9SE VM (build 2.3, J2RE 1.5.0 IBM J9 2.3 Linux x86-32 j9vmxi3223-20050915a (JIT enabled)).
On the Test server I call the run script like so: "run.sh -b test.server.com -c messaging -Djboss.bind.address=0.0.0.0". This test server is then able to accept requests from remote clients (from the 0.0.0.0 bind address option). And because of the -b option, any ConnectionFactory requests to 1099 will return a JbossConnectionFactory - ClientConnectionFactoryDelegate - serverLocatorURI like "http://test.server.com:4458//?callbackPollPeriod=102...".
On the other hand, when I try to call the run script on my Qa server using "run.sh -b qa.server.com -c messaging -Djboss.bind.address=0.0.0.0", I get different behavior. The ports DO open up for remote clients but the serverLocatorURI comes back as "http://127.0.0.1:4458/?callbackPollPeriod=102...". Notice we have 127.0.0.1 instead of the name of the server. This does not help remote clients find the remote objects.
I have spent days trying to manipulate -b, -D, and remoting*.xml files, but to no avail. I can usually only succeed in doing one or the other: opening the ports for remote connections but getting 127.0.0.1 in serverLocatorURI OR getting qa.server.com in serverLocatorURI but blocking remote connections.
I hope that someone will have some ideas.
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154390#4154390
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154390
17 years, 7 months
[JBoss Portal] - portlet upload
by rob_gar_esp
Hi,
I'm implementing a very basic file uploader portlet such, actually I'm trying the portlet provided in the samples:
| public class ResumeTask extends GenericPortlet {
|
| public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, IOException
| {
|
| //
| List fileNames = new ArrayList();
| List fileSizes = new ArrayList();
| List descriptions = new ArrayList();
|
| //
| try
| {
| DiskFileItemFactory factory = new DiskFileItemFactory();
| PortletFileUpload upload = new PortletFileUpload(factory);
| List fileItems = upload.parseRequest(req);
| for (Iterator iterator = fileItems.iterator(); iterator.hasNext();)
| {
| FileItem item = (FileItem)iterator.next();
| if (item.getFieldName().equals("File"))
| {
| fileNames.add("" + item.getName());
| fileSizes.add("" + item.getSize());
| }
| else if (item.getFieldName().equals("Description"))
| {
| descriptions.add("" + item.getString(req.getCharacterEncoding()));
| }
| }
| }
| catch (FileUploadException e)
| {
| throw new PortletException(e);
| }
|
| //
| resp.setRenderParameter("fileNames", (String[])fileNames.toArray(new String[fileNames.size()]));
| resp.setRenderParameter("fileSizes", (String[])fileSizes.toArray(new String[fileSizes.size()]));
| resp.setRenderParameter("contents", (String[])descriptions.toArray(new String[descriptions.size()]));
| }
|
| protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
| {
| //
| resp.setContentType("text/html");
|
| //
| PrintWriter writer = resp.getWriter();
|
| String[] fileNames = req.getParameterValues("fileNames");
| String[] fileSizes = req.getParameterValues("fileSizes");
| String[] descriptions = req.getParameterValues("contents");
| if (descriptions != null)
| {
| for (int i = 0; i < descriptions.length; i++)
| {
| writer.println("Received description " + descriptions + "<br/>");
| }
| }
| if (fileNames != null && fileSizes != null && fileNames.length == fileSizes.length)
| {
| for (int i = 0; i < fileNames.length; i++)
| {
| writer.println("Received file " + fileNames + " with size " + fileSizes + "<br/>");
| }
| }
|
| //
| writer.println("<form action=\"" + resp.createActionURL() + "\" method=\"post\" enctype=\"multipart/form-data\">");
| writer.println("<table>");
| writer.println("<tr><td>Description:</td>");
| writer.println("<td><input type=\"text\" name=\"Description\"></td></tr>");
| writer.println("<tr><td>File:</td>");
| writer.println("<td><input type=\"file\" name=\"File\"></td></tr>");
| writer.println("<tr><td><input type=\"submit\" name=\"Upload\"></td></tr>");
| writer.println("</table>");
| writer.println("</form>");
| }
| }
|
But I'm getting a nasty exception:
anonymous wrote :
|
| 18:11:53,078 ERROR [DefaultPortalControlPolicy] Rendering portlet window produced an error
| org.jboss.portal.portlet.PortletInvokerException: javax.servlet.ServletException
| at org.jboss.portal.portlet.container.PortletContainerInvoker.invoke(PortletContainerInvoker.java:212)
| at org.jboss.portal.portlet.state.producer.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java:233)
| at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.org$jboss$portal$core$impl$portlet$state$ProducerPortletInvoker$invoke$aop(ProducerPortletInvoker.java:53)
| at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
| at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker$invoke_N8654503705355129869.invokeNext(ProducerPortletInvoker$invoke_N8654503705355129869.java)
| at org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker.invoke(ProducerPortletInvoker.java)
| at org.jboss.portal.portlet.federation.impl.FederatedPortletInvokerService.invoke(FederatedPortletInvokerService.java:147)
| at org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService.invoke(FederatingPortletInvokerService.java:150)
| at org.jboss.portal.core.impl.model.instance.InstanceContainerImpl$1.invoke(InstanceContainerImpl.java:99)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
| at org.jboss.portal.portlet.management.PortletContainerManagementInterceptorImpl.invoke(PortletContainerManagementInterceptorImpl.java:58)
| at org.jboss.portal.portlet.invocation.PortletInterceptor.invoke(PortletInterceptor.java:38)
|
|
|
|
|
| Caused by: java.lang.LinkageError: loader constraints violated when linking org/apache/commons/fileupload/FileItemFactory class
| at com.mnemo.siwo.portlet.ResumeTask.processAction(ResumeTask.java:62)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.invokeAction(PortletContainerImpl.java:458)
| at org.jboss.portal.portlet.impl.jsr168.PortletContainerImpl.dispatch(PortletContainerImpl.java:401)
| at org.jboss.portal.portlet.container.PortletContainerInvoker$1.invoke(PortletContainerInvoker.java:86)
| at org.jboss.portal.common.invocation.Invocation.invokeNext(Invocation.java:131)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.org$jboss$portal$core$aspects$portlet$TransactionInterceptor$invokeNotSupported$aop(TransactionInterceptor.java:86)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:112)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
| at org.jboss.aspects.tx.TxPolicy.invokeInNoTx(TxPolicy.java:66)
| at org.jboss.aspects.tx.TxInterceptor$NotSupported.invoke(TxInterceptor.java:102)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor$invokeNotSupported_N4547270787964792031.invokeNext(TransactionInterceptor$invokeNotSupported_N4547270787964792031.java)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invokeNotSupported(TransactionInterceptor.java)
| at org.jboss.portal.core.aspects.portlet.TransactionInterceptor.invoke(TransactionInterceptor.java:56)
|
|
The error occurs at line:
PortletFileUpload upload = new PortletFileUpload(factory);
Please advise. Tx!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154379#4154379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154379
17 years, 7 months
[JCA/JBoss] - Cannot get JtdsDataSource from Jboss config setup
by pjohlie
Hello
I cannot get a net.sourceforge.jtds.jdbcx.JtdsDataSource from a element in a -ds.xml file. All I get is a CCE because the object returned form the JNDI lookup is a org.jboss.resource.adapter.jdbc.WrapperDataSource and not a JtdsDataSource, as I had hoped.
Here are the informative files:
[u]jsp file:
InitialContext ic = new InitialContext();
Object obj=ic.lookup( dsJNDI );
System.out.println("obj="+obj);
jtds = (JtdsDataSource)ic.lookup( dsJNDI ); <--- CCE HERE
con = jtds.getConnection();
pr = con.prepareStatement("select count(*) from vpt_tblHits");
-ds.xml:
<local-tx-datasource>
<jndi-name>MercuryDS</jndi-name>
<connection-url>jdbc:jtds:sqlserver://server:1433;databaseName=Mercury</connection-url>
<driver-class>net.sourceforge.jtds.jdbcx.JtdsDataSource</driver-class>
<user-name>user</user-name>
pw
<min-pool-size>1</min-pool-size>
<max-pool-size>10</max-pool-size>
<type-mapping>MS SQLSERVER2000</type-mapping>
</local-tx-datasource>
web.xml:
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154377#4154377
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154377
17 years, 7 months
[JBoss jBPM] - Re: Error in Process Definition Deployment.
by Fornachari
Kukeltje, I can open here the HSQL Database Manager and can see all tables created, everything is fine, all data are in the tables. The persistence works if I run my process from the jBPM Console. The data are being stored in the tables.
The problem is if I try to instance a process from the eclipse, like I described. I receive the error "couldn't find process definition 'NameOfMyProcess'". I was using all default configurations that came in the hibernate.cfg.xml.
Then I tryied to change the hibernate.cfg.xml. When I changed the hibernate.cfg.xml I received other error: "Could Not Find DataSource".
The differences from the hibernate.cfg.xml file that I was using from the hibernate.cfg.cml file that I tried now (hibernate.cfg.xml that is inside the jbpm-console.war file) are the following lines:
hibernate.cfg.xml that I was using - Receive the error: "couldn't find process definition NameofMyProcess'"
| <!-- JDBC connection properties (begin) -->
| <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
| <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
| <property name="hibernate.connection.username">sa</property>
| <property name="hibernate.connection.password"></property>
| <!-- JDBC connection properties (end) -->
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
| <!-- DataSource properties (begin) ===
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| ==== DataSource properties (end) -->
hibernate.cfg.xml that I tried now - Receive the error: ""Could Not Find DataSource"
| <!-- JDBC connection properties (begin) ===
| <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
| <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
| <property name="hibernate.connection.username">sa</property>
| <property name="hibernate.connection.password"></property>
| ==== JDBC connection properties (end) -->
|
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
|
| <!-- DataSource properties (begin) -->
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| <!-- DataSource properties (end) -->
I just posted the differents lines between the two files, the other lines are the same for both files.
If someone have some idea, please, help me.
I thank all, but I thing I will change the database to MS SQL Server. I hope that will work better than hypersonic.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4154366#4154366
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4154366
17 years, 7 months