[EDITED]
The project i'm working on is a 3 folder project in Java J2EE with servlets and Hibernate for the persistance. The structure is as follow: - Admin -> the main program with the beans and HTML/CSS - Jar -> with the jars, Hibernate tools and classes - War -> with the Servlets
Between them, I use Xstream to share the classes and important info.
I'm using Eclipse and Tomcat 7.
Hope that with this all of you get the global idea.
This what the Xstream debugger said:
Caused by: com.thoughtworks.xstream.converters.ConversionException: satdata.musicoterapia.hibernate.Terapeuta0 : satdata.musicoterapia.hibernate.Terapeuta0
---- Debugging information ----
message : satdata.musicoterapia.hibernate.Terapeuta0
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : satdata.musicoterapia.hibernate.Terapeuta0
class : satdata.musicoterapia.hibernate.Usuario
required-type : satdata.musicoterapia.hibernate.Usuario
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /list/Usuario[2]/terapeuta
class[1] : java.util.ArrayList
converter-type[1] : com.thoughtworks.xstream.converters.collections.CollectionConverter
version : null
Links (I don't have enough reputiation for have more than 2 links):
Complete StackTrace: http://pastebin.com/6vXyD6hC
XML: http://pastebin.com/YM9q3uvq
Servlet: below, in the comment
Where the problem occurs: below, in the comment
Java classes: below, in the comment
If something is missing, ask and I'll put it here. Thanks for all!!!
In your servlet code you are are mentioning :
xstream.alias("Terapeuta", Terapeuta.class);
In XML file it is given as:
<terapeuta class="satdata.musicoterapia.hibernate.Terapeuta0" resolves-to="Terapeuta">
So in logs you are getting error as:
The exception in logs says:
com.thoughtworks.xstream.mapper.CannotResolveClassException:
satdata.musicoterapia.hibernate.Terapeuta0
it seems your class namein MXL should be satdata.musicoterapia.hibernate.Terapeuta
satdata.musicoterapia.hibernate.Terapeuta0
Related
I am launching a model that was created with an old version of repast (RepastSimphony 1.2.0) and I am trying to run it an the latest version of Repast.
I have imported manually the scenarios files to the best of my abilities (I am a beginner with Repast).
Now, when I launch the model in Repast, it has en error because it cannot find a certain file/library/module (I am unsure).
Now, I am not sure whether this is a Repast internal library or some piece of code that I should have been given and that is missing...
Any insight about this error will be welcome !
The error is this one:
WARN [AWT-EventQueue-0] 13:20:38,158 ObjectActionLoader - Error loading information from data. Continuing with model loading.
com.thoughtworks.xstream.converters.ConversionException: repast.score.impl.SGeographyImpl : repast.score.impl.SGeographyImpl
---- Debugging information ----
message : repast.score.impl.SGeographyImpl
cause-exception : com.thoughtworks.xstream.mapper.CannotResolveClassException
cause-message : repast.score.impl.SGeographyImpl
class : java.util.ArrayList
required-type : java.util.ArrayList
converter-type : com.thoughtworks.xstream.converters.collections.CollectionConverter
path : /repast.simphony.visualization.engine.DefaultDisplayDescriptor/projections/repast.score.impl.SGeographyImpl
line number : 61
class[1] : repast.simphony.visualization.engine.DefaultDisplayDescriptor
converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
version :
I traced that the attempt to load something from the scenario description:
<repast.score.impl.SGeographyImpl>
<name>PeopleGeography</name>
</repast.score.impl.SGeographyImpl>
</projections>
<valueLayers/>
<projectionDescriptors>
<entry>
<string>PeopleGeography</string>
<repast.simphony.visualization.engine.DefaultProjectionDescriptor>
<proj class="repast.score.impl.SGeographyImpl" reference="../../../../projections/repast.score.impl.SGeographyImpl"/>
<props/>
</repast.simphony.visualization.engine.DefaultProjectionDescriptor>
</entry>
</projectionDescriptors>
Incidentally, I tried to run a model from the model library (zombies) and it launches and works properly.
I am trying to parametrize some values in the Precise Throughput Timer. So that this can be passed when jmeter is run from the command line.
The xml snippet is below:
<?xml version="1.0" encoding="UTF-8"?>
<PreciseThroughputTimer guiclass="TestBeanGUI" testclass="PreciseThroughputTimer" testname="Precise Throughput Timer" enabled="true">
<doubleProp>
<name>allowedThroughputSurplus</name>
<value>1.0</value>
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="exactLimit">10000</intProp>
<doubleProp>
<name>throughput</name>
<value>${req_per_sec}</value> <!-- variable -->
<savedValue>0.0</savedValue>
</doubleProp>
<intProp name="throughputPeriod">1</intProp>
<longProp name="duration">60</longProp>
<intProp name="batchSize">1</intProp>
<intProp name="batchThreadDelay">0</intProp>
<longProp name="randomSeed">0</longProp>
</PreciseThroughputTimer>
and then I pass the value in when jmeter is started via:
...
--jmeterproperty req_per_sec=${REQ_PER_SEC} \
...
Where REQ_PER_SEC is a bash environment variable... But this fails to run with the following error:
An error occurred: Error in NonGUIDriver Problem loading XML from:'/jmeter/test.jmx'.
Cause:
NumberFormatException: For input string: "${req_per_sec}"
Detail:com.thoughtworks.xstream.converters.ConversionException:
---- Debugging information ----
cause-exception : com.thoughtworks.xstream.converters.ConversionException
cause-message :
first-jmeter-class : org.apache.jmeter.save.converters.TestElementConverter.unmarshal(TestElementConverter.java:105)
class : org.apache.jmeter.save.ScriptWrapper
required-type : org.apache.jmeter.save.ScriptWrapper
converter-type : org.apache.jmeter.save.ScriptWrapperConverter
path : /jmeterTestPlan/hashTree/hashTree/hashTree/PreciseThroughputTimer/doubleProp[2]/value
line number : 90
version : 5.3
-------------------------------
Looking into the logs I also see this:
Caused by: java.lang.NumberFormatException: For input string: "${req_per_sec}"
at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:2043) ~[?:1.8.0_252]
at sun.misc.FloatingDecimal.parseDouble(FloatingDecimal.java:110) ~[?:1.8.0_252]
at java.lang.Double.parseDouble(Double.java:538) ~[?:1.8.0_252]
at java.lang.Double.valueOf(Double.java:502) ~[?:1.8.0_252]
It seems Jmeter is reading the value as a string instead of a double? I cant figure out how to make it get the value passed in via the jmeterproperty property as double.
How do I do this?
You're using the syntax of a JMeter Variable while you're setting a JMeter Property.
You need to either change your ${req_per_sec} to __P() function call like:
${__P(req_per_sec,)}
or add User Defined Variables configuration element and declare req_per_sec global variable with the value of ${__P(req_per_sec,)} if you're using this ${req_per_sec} variable in more than one place:
I am getting error while creating SOAP request.
21 May 2018 18:28:20,791 [Worker[3]] INFO [EndpointDescriptionImpl] [1111907bbb5ef75aNTQwZDM5Y2UxNTYxYzY1Mzc2MGJlM2ViOWUxYjNjMzA.] Building AxisService from wsdl: file: /tmp/unpacked_1526941165474/META-INF/wsdl/WS11_WSDL.wsdl 21 May 2018 18:28:20,792 [Worker[3]] ERROR [WSDL11ToAxisServiceBuilder] [1111907bbb5ef75aNTQwZDM5Y2UxNTYxYzY1Mzc2MGJlM2ViOWUxYjNjMzA.] Schema for namespace 'http://ws.abc.com/' already contains type 'doLoginResponse java.lang.RuntimeException: Schema for namespace 'http://ws.abc.com/' already contains type 'doLoginResponse
at org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:311)
at org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:158)
at org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:347)
at org.apache.axis2.description.WSDLToAxisServiceBuilder.getXMLSchema(WSDLToAxisServiceBuilder.java:140)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.copyExtensibleElements(WSDL11ToAxisServiceBuilder.java:2186)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:306)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.processTypes(WSDL11ToAxisServiceBuilder.java:297)
at org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL11ToAxisServiceBuilder.java:265)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.buildAxisServiceFromWSDL(EndpointDescriptionImpl.java:789)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.setupAxisService(EndpointDescriptionImpl.java:651)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:216)
at org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.<init>(EndpointDescriptionImpl.java:181)
at org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.updateEndpointDescription(ServiceDescriptionImpl.java:296)
at org.apache.axis2.jaxws.description.impl.DescriptionFactoryImpl.updateEndpoint(DescriptionFactoryImpl.java:268)
at org.apache.axis2.jaxws.description.DescriptionFactory.updateEndpoint(DescriptionFactory.java:96)
at org.apache.axis2.jaxws.spi.ServiceDelegate.getPort(ServiceDelegate.java:233)
at javax.xml.ws.Service.getPort(Service.java:92)
at com.alestra.ws.AddressWebService_Service.getAddressWebServicePort(AddressWebService_Service.java:51)
Can anyone suggest ?
Using java 1.6 and axis2 jars.
I also observered that in one system same code is working fine but in other code is getting this issue. I think this is not coding issue, may be some jar or other issue but not sure.
I am trying to run an implementation a jason code that is using some Internal Actions. The interpreter is showing that it was not possible to find the "java" code of the internal action, as showed:
Server running on http://191.36.8.42:3272
[aslparser] [peleus.asl:29] warning: The internal action class for 'org.soton.peleus.act.plan(Goals)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.plan
[aslparser] [peleus.asl:42] warning: The internal action class for 'org.soton.peleus.act.isTrue(H)' was not loaded! Error:
java.lang.ClassNotFoundException: org.soton.peleus.act.isTrue
[peleus] Could not finish intention: intention 1: +des([on(b3,table),on(b2,b3),on(b1,b2)])[source(self)] <- ... org.soton.peleus.act.plan(Goals); !checkGoals(Goals); .print("Goals ",Goals," were satisfied") /
{Goals=[on(b3,table),on(b2,b3),on(b1,b2)]}Trigger: +des([on(b3,table),on(b2,b3),on(b1,b2)])[noenv,code(org.soton.peleus.act.plan([on(b3,table),on(b2,b3),on(b1,b2)])),code_line(29),code_src("peleus.asl"),error(action_failed),error_msg("no environment configured!"),source(self)]
[peleus] Adding belief clear(table)
This mas2j file is as following:
MAS peleus {
infrastructure: Centralised
agents:
peleus;
}
Part of agent code (written by Felipe Meneguzzi) is showed bellow:
//The next line is line 28
+des(Goals) : true
<- org.soton.peleus.act.plan(Goals);
!checkGoals(Goals);
.print("Goals ",Goals," were satisfied").
+!checkGoals([]) : true <- true.
//The next line is line 40
+!checkGoals([H|T]) : true
<- .print("Checking ", H);
org.soton.peleus.act.isTrue(H);
!checkGoals(T).
I guess it is about the folder structure, how to set up Jason to search for java files in specific locations?
The folders structure is like this:
Peleus\src\org\soton\peleus for java files
Peleus\examples for mas2j and asl tested project
It all depends on how you are executing the application.
If you are using java, the CLASSPATH should be defined to include the missing classes.
if you are using jason script (that uses Ant), the .mas2j file should include the class path as well.
More on that in the FAQ. Notice that CLASSPATH is where .class files are found, not .java source code files. The error regards a missing class, not a missing source code.
CONTEXT :
I need to call a "file.py", where is implement my class "myClass", by the Python language OR the JAVA language through Jython.
I do in my "file.py" :
try :
# Jython source file
from com.local.mylocal.jython import ImyClass
except :
ImyClass = None
from threading import Thread
class myClassMetaClass(type) :
def __new__() :
if IClient is None :
bases = (Thread,)
else :
bases = (Thread, ImyClass,)
return type.__new__(metacls, nom, bases, dict)
class myClass(metaclass=myClassMetaClass) :
pass
When I run my PYTHON code, my class : myClass is instance with all metaclass she need. My code run.
When I run my JAVA code who call my PY class through Jython, my code error is :
Exception in thread "main" SyntaxError: ("mismatched input '='
expecting RPAREN", ('../file.py', 52, 22, 'class
myClass(metaclass=myClassMetaClass) :\n')) Blockquote
INVESTIGATION :
I see in "https://github.com/jython/jython3" isaiah solved my probleme.
PROBLEME :
I can't compile the source code on my Windows environement (need : POSIX ...).
I need the "jython3.jar" file.
REQUEST :
How compile jython3 souces on my Windows environement ?
Is it possible to acces to a "jython3.jar" file ?