[JBoss Seam] - Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
by bsmithjj
I see that if hibernate-annotations 3.3.0 is in the classpath, I get the last error, now I am up to this:
| *** CONTEXTS IN ERROR: Name -> Error
| <UNKNOWN> -> ** UNRESOLVED AbstractDemandMetaData$DemandDependencyItem@1f2b0dd{name=jboss.j2ee:jar=classes,name=RatingsHelperBean,service=EJB3 depen
| dsOn=null whenRequired=Described resolved=false demand=persistence.units:jar=classes.jar,unitName=InfoStratGui} **
| persistence.units:jar=classes.jar,unitName=InfoStratGui -> java.lang.SecurityException: Invalid authentication attempt, principal=null
|
| at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.java:151)
| at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
| at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:307)
| at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:14)
| at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
| at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
| at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| 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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:645)
| at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:385)
| at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:141)
| at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
| at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:158)
| at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
| at org.testng.TestRunner.runWorkers(TestRunner.java:673)
| at org.testng.TestRunner.privateRun(TestRunner.java:620)
| at org.testng.TestRunner.run(TestRunner.java:480)
| at org.testng.SuiteRunner.runTest(SuiteRunner.java:278)
| at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:273)
| at org.testng.SuiteRunner.privateRun(SuiteRunner.java:253)
| at org.testng.SuiteRunner.run(SuiteRunner.java:168)
| at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:987)
| at org.testng.TestNG.runSuitesLocally(TestNG.java:951)
| at org.apache.maven.surefire.testng.TestNGExecutor.executeTestNG(TestNGExecutor.java:161)
| at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:101)
| at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
| 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:275)
| at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:832)
|
How do I turn off the security stuff for testing?
Thanks,
Brad
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100382#4100382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100382
18Â years, 5Â months
[JBoss Seam] - Re: Multiple <s:convertEntity /> from different persistence
by jarkkoï¼ jab.fi
And actually I solved the issue by using the unrestricted entity manager for getting the list and the use the restricted entity manger to load the entity.
| public List <Manager> getManagers() {
| String query = "from Manager";
| // use the unrestricted entity mananger to get the list
| Query q = adminEntityManager.createQuery(query);
| return = q.getResultList();
| }
|
And later, when the admin is updating the entity
| public Manager modify(Manager selectedManager) {
|
| return unrestrictedEntityManager.find(Manager.class, selectedManager.getId());
| }
|
EntityManager.find() does load the entity, even if manager.deleted is not null (and deleted is less than todate). So the filter is not applied when using EntityManager.find(), but I'll need to check that this is always true.
And this works because s:convertEntity also uses the same unrestrictedEntityManager.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100381#4100381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100381
18Â years, 5Â months
[Clustering/JBoss] - Multiple Clusters -Load balancing response to previous threa
by jboss_cody
Hello,
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=121694
I have a question somewhat related to this thread, concerning "horizontal" clustering. As of now, I have a cluster containing 3 nodes. (node1,2,3 respectively) I need to duplicate this cluster yet again with 3 more nodes. (e.g. node4,5,6). The issue I am having is concerning the communication between my TWO clusters. (cluster1 = node1,2,3; cluster2=node4,5,6)
How do you configure the session replication/fail over between multiple "horizontal" clusters?
It is my understanding that the JGroups configuration is only responsible for communication among nodes within a cluster. I have read the Server_Configuration_Guide.pdf, yet it is not clear to me how a given cluster communicates with another cluster.
If anyone could just shed some light I would be most grateful.
Please Help,
Thanks...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100379#4100379
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100379
18Â years, 5Â months
[Persistence, JBoss/CMP, Hibernate, Database] - hsqldb sqlexception help
by jboss_dev
I am trying to use hsqldb in jboss-4.0.5.GA .I tried the following small jdbc code .
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
class JDBC_test
{
public static void main(String args[])
{
Connection conn=null;
Statement select=null;
try
{
Class.forName("org.hsqldb.jdbcDriver");
System.out.println("Driver loaded...");
}
catch(Exception e)
{
System.out.println("Failed to load hsql driver.");
return;
}
try
{
conn = DriverManager.getConnection("jdbc:hsqldb:file:db/anu","sa","");
System.out.println("connected to hsql..");
select = conn.createStatement();
System.out.println("after create statement..");
}
catch(Exception e) {System.out.println("create statement failed");}
try
{
ResultSet result = select.executeQuery("SELECT custid,firstname FROM customer_details");
System.out.println("Got results:");
while (result.next())
{ // process results one row at a time
int key = result.getInt(1);
String val = result.getString(2);
System.out.println("key = " + key);
System.out.println("val = " + val);
}
} catch (Exception e) {
e.printStackTrace();}
finally
{
if(conn!=null)
{
try { conn.close(); }
catch(Exception e){e.printStackTrace();}
}
}
}
}
I have a table customer_details created with few columns in the stand alone mode.
But I am getting the following error while running the code
Driver loaded...
connected to hsql..
after create statement..
java.sql.SQLException: Table not found in statement [SELECT custid,firstname FRO
M customer_details]
at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.fetchResult(Unknown Source)
at org.hsqldb.jdbc.jdbcStatement.executeQuery(Unknown Source)
at JDBC_test.main(JDBC_test.java:36)
Can anyone help me out with this error?
thanks and regards,
java_dev.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100376#4100376
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100376
18Â years, 5Â months
[JBoss Seam] - Re: NoClassDefFoundError with SeamTest
by neilac333
So I completely purged my test method of all meaningful code. The only line in the test method is this:
| Assert.assertTrue(true);
|
And then I got I got a completely strange error:
| java.lang.RuntimeException: Unable to create a KernelInitializer based on the specified KernelConfig
| at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:156)
| at org.jboss.kernel.KernelFactory.assembleNewKernel(KernelFactory.java:99)
| at org.jboss.kernel.KernelFactory.newInstance(KernelFactory.java:67)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.bootstrap(AbstractBootstrap.java:120)
| at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
| at org.jboss.embedded.Bootstrap.createKernel(Bootstrap.java:131)
| at org.jboss.embedded.Bootstrap.getInstance(Bootstrap.java:76)
| at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:10)
| at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:967)
| at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:892)
| at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| 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.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:604)
| at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:394)
| at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:142)
| at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:79)
| at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:165)
| at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:103)
| at org.testng.TestRunner.runWorkers(TestRunner.java:678)
| at org.testng.TestRunner.privateRun(TestRunner.java:624)
| at org.testng.TestRunner.run(TestRunner.java:495)
| at org.testng.SuiteRunner.runTest(SuiteRunner.java:300)
| at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:295)
| at org.testng.SuiteRunner.privateRun(SuiteRunner.java:275)
| at org.testng.SuiteRunner.run(SuiteRunner.java:190)
| at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:792)
| at org.testng.TestNG.runSuitesLocally(TestNG.java:765)
| at org.testng.TestNG.run(TestNG.java:699)
| at org.testng.TestNG.privateMain(TestNG.java:824)
| at org.testng.TestNG.main(TestNG.java:802)
| Caused by: java.lang.AbstractMethodError: org.jboss.aop.microcontainer.integration.AOPJoinpointFactoryBuilder.createJoinpointFactory(Lorg/jboss/reflect/spi/ClassInfo;Lorg/jboss/repository/spi/MetaDataContext;)Lorg/jboss/joinpoint/spi/JoinpointFactory;
| at org.jboss.classadapter.plugins.BasicClassAdapter.getJoinpointFactory(BasicClassAdapter.java:85)
| at org.jboss.beans.info.plugins.AbstractBeanInfo.getJoinpointFactory(AbstractBeanInfo.java:140)
| at org.jboss.kernel.plugins.config.Configurator.findConstructor(Configurator.java:210)
| at org.jboss.kernel.plugins.config.Configurator.getConstructorJoinPoint(Configurator.java:194)
| at org.jboss.kernel.plugins.config.Configurator.instantiate(Configurator.java:92)
| at org.jboss.kernel.plugins.config.Configurator.instantiateAndConfigure(Configurator.java:68)
| at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.getImplementation(PropertyKernelConfig.java:149)
| at org.jboss.kernel.plugins.config.property.PropertyKernelConfig.createKernelInitializer(PropertyKernelConfig.java:117)
| at org.jboss.kernel.KernelFactory.createKernelInitializer(KernelFactory.java:150)
| ... 32 more
|
What the heck is that???
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100375#4100375
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100375
18Â years, 5Â months
[JBoss Seam] - Re: Writing SeamTests with Seam 2.0.0. CR2 - What's Changed?
by bsmithjj
ok, now I have this to figure out:
| On=null whenRequired=Described resolved=false demand=persistence.units:jar=classes.jar,unitName=InfoStratGui} **
| persistence.units:jar=classes.jar,unitName=InfoStratGui -> java.lang.NoSuchMethodError: org.hibernate.cfg.AnnotationConfiguration.getReflectionManag
| er()Lorg/hibernate/reflection/ReflectionManager;
|
| at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.java:151)
| at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
| at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:307)
| at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:14)
| at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
| at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
| at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4100371#4100371
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4100371
18Â years, 5Â months