[JBoss Portal] - Re: JBP_REGISTRATION_INFO sql error name key
by chris.laprun@jboss.com
"esmith1" wrote : Portal 2.6.6
| AS 4.2.2
| JDK 1.5.0_12
| DB = sqlserver using sql_latin1_general_cp1_cs_as (case sens) collation
|
| I am getting an error during startup (below) because the JBP_REG_PROPERTY table has a (capital) "NAME" field but the hibernate definition of the map-key in JBP_REGISTRATION_INFO that references it is lowercase.
| As a quick test I changed jboss-portal.sar\portal-wsrp.sar\conf\hibernate\consumer\domain.hbm.xml
| JBP_REGISTRATION_INFO class map persistentRegistrationProperties property map-key from
|
| <map-key type="string" formula="name"/> to <map-key type="string" formula="NAME"/> and the error went away. Can a JIRA be entered for this?
|
Please do so. Don't forget to link to this forum topic in the appropriate field of the JIRA task. Thanks for the report!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169059#4169059
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169059
17 years, 10 months
[JNDI/Naming/Network] - Re: Datasource is null
by badam571
hi itsme
Here is the jndi view:
java: Namespace
+- SecurityProxyFactory (class: org.jboss.security.SubjectSecurityProxyFactory)
+- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)
+- comp (class: javax.naming.Context)
+- JDBC (class: org.jnp.interfaces.NamingContext)
| +- SybaseDS (class:
org.jboss.resource.adapter.jdbc.WrapperDataSource)
+- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)
+- jaas (class: javax.naming.Context)
| +- 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)
+- TransactionPropagationContextImporter (class: org.jboss.tm.TransactionPropagationContextImporter)
+- TransactionManager (class: org.jboss.tm.TxManager)
Here is the JBOSS.JDBC:
jboss.jdbc
datasource=SybaseDS,service=metadata
service=SQLExceptionProcessor
service=metadata
however, one thing to note: my datasource lookup is as follows:
ds = (DataSource)ic.lookup("java:jdbc/SybaseDS");
and I have change: jndi name in
the jndi name on sybase-ds.xml is (I am using Sybase)
<local-tx-datasource>
<jndi-name>JDBC/SybaseDS</jndi-name>
the database url:
<connection-url>jdbc:sybase:Tds:wi3db1.caci.com:5000/SQ3XX</connection-url>
<driver-class>com.sybase.jdbc2.jdbc.SybDataSource</driver-class>
and the mapping is:
<type-mapping>Sybase</type-mapping>
key point:
I can bind the datasource to jndi -- since the catch for catching naming error is passed alright, but I caught the general exception.
thanks
badam571
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169057#4169057
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169057
17 years, 10 months
[JBoss jBPM] - Lazy Initaslization Error
by saurabh.khattar
I have made a small BPM web application. In one of the methods in servlet I am getting the instances for a particular user:
private void getProcessDetails(HttpServletRequest request, HttpServletResponse response) {
|
| HttpSession session = request.getSession();
|
| List jbpmTaskInstances = new ArrayList();
|
| JbpmConfiguration jbpmConfiguration = JbpmEncompassConfiguration.instance().getJbpmConfiguration();
| JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
|
|
| Session jbpmContextSession = jbpmContext.getSession();
|
|
| String actorPmId = new String("PM");
| String actorCordId = new String("Coordinator");
|
| List actorsList = new ArrayList();
| actorsList.add(actorPmId);
| List pooledPmTaskInstances = jbpmContext.getTaskMgmtSession().findTaskInstances(actorsList);
| List jbpmPmTaskInstanceList = jbpmContextSession.createQuery("from org.jbpm.taskmgmt.exe.TaskInstance ti where ti.start is null and ti.end is null and actorId = '"+actorPmId+"'").list();
| //add pooledTaskInstances to taskList
| jbpmPmTaskInstanceList.addAll(pooledPmTaskInstances);
| jbpmTaskInstances.addAll(jbpmPmTaskInstanceList);
|
| actorsList = new ArrayList();
| actorsList.add(actorCordId);
| List pooledCordTaskInstances = jbpmContext.getTaskMgmtSession().findTaskInstances(actorsList);
| List jbpmCordTaskInstanceList = jbpmContextSession.createQuery("from org.jbpm.taskmgmt.exe.TaskInstance ti where ti.start is null and ti.end is null and actorId = '"+actorCordId+"'").list();
| //add pooledTaskInstances to taskList
| jbpmCordTaskInstanceList.addAll(pooledCordTaskInstances);
| jbpmTaskInstances.addAll(jbpmCordTaskInstanceList);
|
| Iterator iAll = jbpmTaskInstances.iterator();
| Iterator iPm = jbpmPmTaskInstanceList.iterator();
| Iterator iCord = jbpmCordTaskInstanceList.iterator();
|
| List jbpmProcessInstances = new ArrayList();
|
| while(iAll.hasNext()){
| TaskInstance ti = (TaskInstance) iAll.next();
| ProcessInstance processInstance = ti.getProcessInstance();
| jbpmProcessInstances.add(processInstance);
| }
|
|
|
| session.setAttribute("pmTaskList", jbpmPmTaskInstanceList);
| session.setAttribute("cordTaskList", jbpmCordTaskInstanceList);
| session.setAttribute("allTaskList", jbpmProcessInstances);
|
|
|
| //jbpmContextSession.close();
| jbpmContext.close();
|
| }
|
|
I set arraylist of process instances in the session. But when I try to access process instances in jsp it gives the following error:
|
| 10:13:39,214 ERROR [LazyInitializationException] could not initialize proxy - the owning Session was closed
| org.hibernate.LazyInitializationException: could not initialize proxy - the owning Session was closed
| at org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:60)
| at org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:111)
| at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.invoke(CGLIBLazyInitializer.java:172)
| at org.jbpm.graph.exe.ProcessInstance$$EnhancerByCGLIB$$614637f6.getContextInstance(<generated>)
| at org.apache.jsp.jsp.index_jsp._jspService(index_jsp.java:121)
| 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:334)
| 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:96)
| 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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| 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:156)
| 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:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| 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:595)
Please some one help me....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169056#4169056
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169056
17 years, 10 months
[Security & JAAS/JBoss] - How to authenticate to the JBoss server without FORM authent
by Marcos_APS
- JBoss 4.2.3.GA
- Java 5 Update 16
Hello, everybody!
I have a web application already in production that uses FORMs authentication as the way for the user to log in in the application. All the business logic that this web application uses is in a EJB jar file deployed in the same server. So, as it uses FORM authentication all the authentication process is handled for me automatically. This is working ok.
I already have client (Swing) applicatios that connect to the same server and also have to make session bean calls. In order to do so, I had to manually authenticate to the JBoss server in the client application. I used code like this to authenticate the user on the server:
| import javax.naming.CommunicationException;
| import javax.security.auth.callback.CallbackHandler;
| import javax.security.auth.login.LoginContext;
| import javax.security.auth.login.LoginException;
|
| import org.jboss.security.auth.callback.UsernamePasswordHandler;
|
| //
|
| private LoginContext fLoginContext;
|
| public void connect(String userName, String password) throws Exception
| {
| String configFile = "jaas.config";
| System.setProperty("java.security.auth.login.config", configFile);
|
| CallbackHandler manager =
| new UsernamePasswordHandler(userName, password);
| fLoginContext = new LoginContext("login", manager);
| fLoginContext.login();
|
| testLogin();
| }
|
| public void disconnect()
| {
| if (fLoginContext == null)
| {
| throw new UnsupportedOperationException(
| "Connection still not established.");
| }
| try
| {
| fLoginContext.logout();
| }
| catch (LoginException ex)
| {
| MessageDialog.showError(ex.getMessage());
| }
| }
|
| // This method just invokes a function in a real EJB to make the real
| // authentication
| private void testLogin() throws Exception
| {
| IReservaManager reserveManager =
| FabricaDados.getInstance().getReserveManager();
| reserveManager.find();
| }
|
The code above is working ok as well.
Now I'm developing another web application. This new web application, as the other web application, also has to make calls on the session beans of another EJB jar file. But this web application doesn't use FORM authentication, so I think I'll have to provide the authentication manually as I did for the client (Swing) application. This is where my doubt is. Do I have to use something similar to the code that I use in the Swing application to authenticate in the web application or is there another way in JBoss to make the authentication from a web application that doesn't use FORM authentication? I'm really in doubt with this.
So, what's the right idiom (pattern) to authenticate (and disconnect later) to the JBoss server in order to make session bean method calls in a web application that doesn't use FORM authentication?
Thank you very much.
Marcos
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4169048#4169048
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4169048
17 years, 10 months