[JBoss jBPM] - MYSQL database connection within JBoss application(using JSF
by ccelgun
I hope i am writing this question into the correct place.
I am trying to make an application with JBoss. I have to establish connection with MYSQL database.I found some articles about how to connect to MYSQL database and i believe that i did everything correct.
But this error message is shown on the web browser after i ran the program.
Exception :
javax.servlet.ServletException : Cannot get value for expression '#{homeBean.taskInstances}'
javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
root cause:
javax.faces.facesException: Cannot get value for expression '#{homeBean.taskInstances}'
org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
org.apache.myfaces.application.jsp.JspViewhandlerImpl.renderView(JspViewHandlerImpl.java:234)
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
javax.faces.webapp.FacesServlet.service(facesServlet.java:95)
<brZorg.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959495#3959495
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959495
19 years, 9 months
[Installation, Configuration & Deployment] - Re: Configuration to remove key
by jijisv
I got the solution...
We can change value of key Server by configuring it in the Connector configuration in "server.xml".
......
| ......
| <Connector server="My Server" port="8080" address="${jboss.bind.address}"
| maxThreads="5000" maxSpareThreads="40" minSpareThreads="20"
| strategy="ms" maxHttpHeaderSize="8192" emptySessionPath="true"
| enableLookups="true" acceptCount="40"
| connectionTimeout="60000" disableUploadTimeout="true"/>
| ......
| ......
Now the response is
HTTP/1.1 200 OK
| Set-Cookie: JSESSIONID=9C46D0475D0626A7CDC622410D5F3B4A; Path=/
|
| Stored cookie 192.168.1.58 8080 / nonpermanent 0 Thu Jan 1 05:29:59 1970
| JSESSIONID 9C46D0475D0626A7CDC622410D5F3B4A
| Content-Type: text/html;charset=ISO-8859-1
| Content-Length: 450
| Date: Thu, 20 Jul 2006 09:14:15 GMT
| Connection: keep-alive
| Server: My Server
~Jiji :)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959492#3959492
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959492
19 years, 9 months
[JBoss Seam] - Re: @Begin and @End
by baz
anonymous wrote : And then, whenever the id of the object is available in a context variable or request parameter, we can just inject the correct instance.
Hi Gavin,
i have tried your approach with a ManagedHibernateEntity.
i must learn what the word 'whenever' means:
if the id is not available i get an exception
11:03:13,156 DEBUG org.jboss.seam.Component: instantiating Seam component: bazProject
| 11:03:13,156 DEBUG org.jboss.seam.Component: initializing new instance of: bazProject
| 11:03:13,218 DEBUG org.jboss.seam.Component: seam component not found: bazProjectID
| 11:03:13,234 DEBUG org.hibernate.jdbc.JDBCContext: successfully registered Synchronization
| java.lang.IllegalArgumentException: id to load is required for loading
| at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:51)
| at org.hibernate.event.LoadEvent.<init>(LoadEvent.java:33)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:796)
| at org.hibernate.impl.SessionImpl.get(SessionImpl.java:792)
| at org.jboss.seam.core.ManagedHibernateEntity.getInstance(ManagedHibernateEntity.java:52)
|
Does it make sense to you to write getInstance in this way?
@Unwrap
| public Object getInstance() throws ClassNotFoundException
| {
| Class clazz = Class.forName(entityClass);
| if (id==null) return null;
| return session.get(clazz, id);
| }
|
Ciao,
Carsten
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959489#3959489
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959489
19 years, 9 months
[Installation, Configuration & Deployment] - Re: To check for the unclosed connections and transaction te
by jaikiran
I just tried this out myself by uncommenting the settings in server.xml and jboss-service.xml. I created a connection in jsp and intentionally left it open. Here's what i found in the server.log(and even on the console):
2006-07-20 14:35:45,015 INFO [org.jboss.resource.connectionmanager.CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.WrappedConnection@14c7deb
| java.lang.Throwable: STACKTRACE
| at org.jboss.resource.connectionmanager.CachedConnectionManager.registerConnection(CachedConnectionManager.java:333)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:482)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConnection(BaseConnectionManager2.java:894)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| at org.apache.jsp.testSMTPAppender_jsp._jspService(org.apache.jsp.testSMTPAppender_jsp:58)
| at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322)
| at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:138)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:534)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959483#3959483
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959483
19 years, 9 months
[JBossWS] - A class as a parameter in a webservice
by nax32
Hi! i have this bean that is a webservice:
// standard JSR181 annotations
| @WebService(name = "EndpointInterface", targetNamespace = "http://org.jboss.ws/samples/jsr181ejb", serviceName = "EJB3Service")
| // @SOAPBinding(style = SOAPBinding.Style.RPC)
|
| @SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
| use = SOAPBinding.Use.LITERAL ,
| parameterStyle=SOAPBinding.ParameterStyle.BARE)
|
|
| // standard EJB3 annotations
| @Remote(EJB3RemoteInterface.class)
| // @RolesAllowed("friend")
| @Stateless
|
| // jboss propriatary annotations
| @RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
| @PortComponent(authMethod="BASIC", transportGuarantee="NONE")
| @SecurityDomain("JBossWS")
| public class EJB3Bean01 implements EJB3RemoteInterface
| {
|
| @WebMethod
| public String echo(@WebParam( name="elLibro" )libro input)
| {
| return "Lo que recibí es " + input;
| }
| }
As you can see, the parameter is not a standard type. i have the class "libro" like this:
public class libro {
|
| String Nombre;
| String Autor;
| int edicion;
| String[] compradores;
|
| public libro () {
| }
| }
i want to generate the wsdl file, but when i do it, the class "libro" is not specified:
<complexType name="libro">
| <sequence/>
| </complexType>
what sould i do to obtain something like this?
<complexType name="libro">
| <sequence>
| <s:element name="Nombre" type="s:string"/>
| <s:element name="Autor" type="s:string"/>
| ...
| </sequence>
| </complexType>
THANKS!!!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3959482#3959482
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3959482
19 years, 9 months