I am using db2 version 10.5 and inserting the values into the DB2JSON, created a simple standalone java program to retrieve all the values from the table(Collection) when I run the query I am getting the following error
Exception in thread "main" java.lang.RuntimeException: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.69.66] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
at com.ibm.nosql.json.api.DBObjectRowHandler.handle(DBObjectRowHandler.java:38)
at com.ibm.nosql.json.api.DBObjectRowHandler.handle(DBObjectRowHandler.java:14)
at com.ibm.nosql.json.api.BaseResultIterator.next(BaseResultIterator.java:119)
at com.ibm.nosql.json.api.DBCursor.fetchResultsEagerly(DBCursor.java:801)
at com.ibm.nosql.json.api.DBCursor.find(DBCursor.java:895)
at com.ibm.nosql.json.api.DBCursor.hasNext(DBCursor.java:278)
at com.ws.Demo.TestingDemo.main(TestingDemo.java:47)
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][1065][12306][3.69.66] Caught java.io.CharConversionException. See attached Throwable for details. ERRORCODE=-4220, SQLSTATE=null
at com.ibm.db2.jcc.am.gd.a(gd.java:733)
at com.ibm.db2.jcc.am.gd.a(gd.java:66)
at com.ibm.db2.jcc.am.gd.a(gd.java:120)
at com.ibm.db2.jcc.am.kc.a(kc.java:2868)
at com.ibm.db2.jcc.am.kc.p(kc.java:525)
at com.ibm.db2.jcc.am.kc.Z(kc.java:2747)
at com.ibm.db2.jcc.am.ResultSet.getObjectX(ResultSet.java:1438)
at com.ibm.db2.jcc.am.ResultSet.getObject(ResultSet.java:1413)
at com.ibm.nosql.json.api.DBResultSet.getObject(DBResultSet.java:255)
at com.ibm.nosql.json.api.DBData.getObjectX(DBData.java:66)
at com.ibm.nosql.json.api.DBObjectRowHandler.getObjectID(DBObjectRowHandler.java:58)
at com.ibm.nosql.json.api.DBObjectRowHandler.handle(DBObjectRowHandler.java:28)
... 6 more
Caused by: java.nio.charset.MalformedInputException: Input length = 290
at com.ibm.db2.jcc.am.r.a(r.java:19)
at com.ibm.db2.jcc.am.kc.a(kc.java:2864)
... 14 more
Caused by: sun.io.MalformedInputException
at sun.io.ByteToCharUTF8.convert(ByteToCharUTF8.java:292)
at com.ibm.db2.jcc.am.r.a(r.java:16)
... 15 more
I also went throught few posts where it suggest to use db2.jcc.charsetDecoderEncoder=3 but I have no idea where to use it, and also I few other posts it is suggested touse the lastest version db2jcc.jar, I am using the jars that is present inside the db2 10.5 under sqllib folder. Anyone let me know how to fix this
Add the following environment variable(Java VM arguments) in your tomcat settings
-Ddb2.jcc.charsetDecoderEncoder=3
This worked.
You can set the charset decoder encoder using system property inside your Java code.
For example:
System.setProperty("db2.jcc.charsetDecoderEncoder", "3");
Related
I have problems with the latest mongodb driver 4.4.0 on my Linux machine with Java 17. It throws following exception:
Exception java.io.UncheckedIOException: java.net.SocketException: Unsupported address type
at DatagramSocketAdaptor.connect (DatagramSocketAdaptor.java:120)
at DatagramSocket.connect (DatagramSocket.java:474)
at DnsClient.doUdpQuery (DnsClient.java:408)
at DnsClient.query (DnsClient.java:214)
at Resolver.query (Resolver.java:81)
at DnsContext.c_getAttributes (DnsContext.java:434)
at ComponentDirContext.p_getAttributes (ComponentDirContext.java:235)
at PartialCompositeDirContext.getAttributes (PartialCompositeDirContext.java:141)
at PartialCompositeDirContext.getAttributes (PartialCompositeDirContext.java:129)
at InitialDirContext.getAttributes (InitialDirContext.java:171)
at DefaultDnsResolver.resolveAdditionalQueryParametersFromTxtRecords (DefaultDnsResolver.java:114)
at ConnectionString.<init> (ConnectionString.java:388)
at (#5:1)
Caused by: java.net.SocketException: Unsupported address type
at Net.translateToSocketException (Net.java:187)
at DatagramSocketAdaptor.connectInternal (DatagramSocketAdaptor.java:95)
at DatagramSocketAdaptor.connect (DatagramSocketAdaptor.java:118)
...
Caused by: java.nio.channels.UnsupportedAddressTypeException
at Net.checkAddress (Net.java:161)
at DatagramChannelImpl.connect (DatagramChannelImpl.java:1217)
at DatagramSocketAdaptor.connectInternal (DatagramSocketAdaptor.java:91)
...
It works as expected on my Windows with Java 17 and also on that Linux with Java 11.
How do I test it:
$ jshell --class-path mongodb-driver-core-4.4.0.jar
jshell> import com.mongodb.ConnectionString;
jshell> ConnectionString cs = new ConnectionString("mongodb+srv://xyz.mongodb.net/");
Expected result is javax.naming.NameNotFoundException: DNS name not found, however actual result is the java.nio.channels.UnsupportedAddressTypeException.
Any idea how to make it work?
After a lot of "jdbing" I found out, that I can make it work with older implementation of DatagramSocketImpl as is stated here https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/DatagramSocketImpl.html
I.e. if I set jdk.net.usePlainDatagramSocketImpl system property to "true" then it works.
Although I don't know proper solution or the real cause of the problem, I can live with the workaround and it works for me.
Read: This is not my code that is producing the exception. This is purely the builder that is making this error. This is not a duplicate of any question that is related to the indexoutofbounds exception as it pertains to written code.
I'm using the most recent version of eclipse, and when I try to build any project in my workspace, I get the following error
'Errors occurred during the build.
Errors running builder 'Java Builder' on project '[project]'.
offset 9673, count -7399, length 13677'
Looking into the log yields the full stacktrace:
!ENTRY org.eclipse.jdt.ui 4 0 2020-11-13 22:54:50.333
!MESSAGE Error in JDT Core during reconcile
!STACK 1
Java Model Exception: java.lang.StringIndexOutOfBoundsException: offset 9673, count -7399, length 13677
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:324)
at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:192)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:268)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596)
at org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:1141)
at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:173)
at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:94)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:736)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:802)
at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1318)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:131)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:113)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:93)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:90)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:157)
at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:94)
at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(JavaCompositeReconcilingStrategy.java:107)
at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:76)
at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:210)
Caused by: java.lang.StringIndexOutOfBoundsException: offset 9673, count -7399, length 13677
at java.base/java.lang.String.checkBoundsOffCount(String.java:3304)
at java.base/java.lang.String.rangeCheck(String.java:280)
at java.base/java.lang.String.<init>(String.java:276)
at org.eclipse.jdt.internal.compiler.parser.Scanner.disambiguatedToken(Scanner.java:5491)
at org.eclipse.jdt.internal.compiler.parser.Scanner.getNextToken(Scanner.java:1461)
at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.readTokenFromScanner(LexStream.java:84)
at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.token(LexStream.java:154)
at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.kind(LexStream.java:194)
at org.eclipse.jdt.internal.compiler.parser.diagnose.DiagnoseParser.diagnoseParse(DiagnoseParser.java:312)
at org.eclipse.jdt.internal.compiler.parser.Parser.reportSyntaxErrors(Parser.java:14010)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12843)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12902)
at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.parseStatements(ConstructorDeclaration.java:587)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.parseMethods(TypeDeclaration.java:1138)
at org.eclipse.jdt.internal.compiler.parser.Parser.getMethodBodies(Parser.java:11825)
at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:1058)
at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:195)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:268)
at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:113)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:326)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:312)
at org.eclipse.jdt.internal.core.SearchableEnvironment.find(SearchableEnvironment.java:184)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findType(SearchableEnvironment.java:478)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.fromSplitPackageOrOracle(LookupEnvironment.java:424)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.lambda$1(LookupEnvironment.java:297)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForTypeFromModules(LookupEnvironment.java:391)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:296)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:276)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3464)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3175)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:57)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:536)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:638)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:634)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:2282)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:1257)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:1224)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:1071)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:529)
at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:1066)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:272)
... 19 more
Caused by: java.lang.StringIndexOutOfBoundsException: offset 9673, count -7399, length 13677
at java.base/java.lang.String.checkBoundsOffCount(String.java:3304)
at java.base/java.lang.String.rangeCheck(String.java:280)
at java.base/java.lang.String.<init>(String.java:276)
at org.eclipse.jdt.internal.compiler.parser.Scanner.disambiguatedToken(Scanner.java:5491)
at org.eclipse.jdt.internal.compiler.parser.Scanner.getNextToken(Scanner.java:1461)
at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.readTokenFromScanner(LexStream.java:84)
at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.token(LexStream.java:154)
at org.eclipse.jdt.internal.compiler.parser.diagnose.LexStream.kind(LexStream.java:194)
at org.eclipse.jdt.internal.compiler.parser.diagnose.DiagnoseParser.diagnoseParse(DiagnoseParser.java:312)
at org.eclipse.jdt.internal.compiler.parser.Parser.reportSyntaxErrors(Parser.java:14010)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12843)
at org.eclipse.jdt.internal.compiler.parser.Parser.parse(Parser.java:12902)
at org.eclipse.jdt.internal.compiler.ast.ConstructorDeclaration.parseStatements(ConstructorDeclaration.java:587)
at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.parseMethods(TypeDeclaration.java:1138)
at org.eclipse.jdt.internal.compiler.parser.Parser.getMethodBodies(Parser.java:11825)
at org.eclipse.jdt.internal.compiler.SourceElementParser.parseCompilationUnit(SourceElementParser.java:1058)
at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:195)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:268)
at org.eclipse.jdt.internal.core.SourceRefElement.generateInfos(SourceRefElement.java:113)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:326)
at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:312)
at org.eclipse.jdt.internal.core.SearchableEnvironment.find(SearchableEnvironment.java:184)
at org.eclipse.jdt.internal.core.SearchableEnvironment.findType(SearchableEnvironment.java:478)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.fromSplitPackageOrOracle(LookupEnvironment.java:424)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.lambda$1(LookupEnvironment.java:297)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForTypeFromModules(LookupEnvironment.java:391)
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:296)
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:276)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getTypeOrPackage(Scope.java:3464)
at org.eclipse.jdt.internal.compiler.lookup.Scope.getType(Scope.java:3175)
at org.eclipse.jdt.internal.compiler.ast.SingleTypeReference.getTypeBinding(SingleTypeReference.java:57)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.internalResolveType(TypeReference.java:536)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:638)
at org.eclipse.jdt.internal.compiler.ast.TypeReference.resolveType(TypeReference.java:634)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.resolveTypeFor(SourceTypeBinding.java:2282)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.fields(SourceTypeBinding.java:1257)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.internalFaultInTypeForFieldsAndMethods(SourceTypeBinding.java:1224)
at org.eclipse.jdt.internal.compiler.lookup.SourceTypeBinding.faultInTypesForFieldsAndMethods(SourceTypeBinding.java:1071)
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:529)
at org.eclipse.jdt.internal.compiler.Compiler.resolve(Compiler.java:1066)
at org.eclipse.jdt.internal.core.CompilationUnitProblemFinder.process(CompilationUnitProblemFinder.java:272)
at org.eclipse.jdt.internal.core.CompilationUnit.buildStructure(CompilationUnit.java:192)
at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:268)
at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:596)
at org.eclipse.jdt.internal.core.CompilationUnit.makeConsistent(CompilationUnit.java:1141)
at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.makeConsistent(ReconcileWorkingCopyOperation.java:173)
at org.eclipse.jdt.internal.core.ReconcileWorkingCopyOperation.executeOperation(ReconcileWorkingCopyOperation.java:94)
at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:736)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:802)
at org.eclipse.jdt.internal.core.CompilationUnit.reconcile(CompilationUnit.java:1318)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:131)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.access$0(JavaReconcilingStrategy.java:113)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy$1.run(JavaReconcilingStrategy.java:93)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:90)
at org.eclipse.jdt.internal.ui.text.java.JavaReconcilingStrategy.reconcile(JavaReconcilingStrategy.java:157)
at org.eclipse.jdt.internal.ui.text.CompositeReconcilingStrategy.reconcile(CompositeReconcilingStrategy.java:94)
at org.eclipse.jdt.internal.ui.text.JavaCompositeReconcilingStrategy.reconcile(JavaCompositeReconcilingStrategy.java:107)
at org.eclipse.jface.text.reconciler.MonoReconciler.process(MonoReconciler.java:76)
at org.eclipse.jface.text.reconciler.AbstractReconciler$BackgroundThread.run(AbstractReconciler.java:210)
What is causing this error? If I was to guess, it is the metadata of the workspace or files not matching up with the actual files, however there is not enough information online to confirm this.
I have tried deleting all workspace metadata, clearing all eclipse configuration files, running eclipse with -clean, and re-installing my JDK (JDK 11). None of these attempts have changed or removed the error.
How do I remove this error and allow eclipse to build again?
I'm trying to extract the content of a large dataset that contains a mix of files (pdf, doc, ppt).
I'm using tika-app-1.12.jar, when T run my code everything done perfectly then I got this error
Exception in thread "main" org.apache.tika.exception.TikaException:
Unexpected RuntimeException from
org.apache.tika.parser.microsoft.OfficeParser#3ea25501 at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:258)
at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:256)
at
org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120)
at
recruitmentprototyp.RecruitmentPrototyp.tikareadDoc(RecruitmentPrototyp.java:135)
at
recruitmentprototyp.RecruitmentPrototyp.doForAll(RecruitmentPrototyp.java:110)
at
recruitmentprototyp.RecruitmentPrototyp.main(RecruitmentPrototyp.java:897)
Caused by: java.lang.IllegalStateException: Pap style 19 claimed to
have itself as its parent, which isn't allowed at
org.apache.poi.hwpf.model.StyleSheet.createPap(StyleSheet.java:232)
at org.apache.poi.hwpf.model.StyleSheet.<init>(StyleSheet.java:120)
at org.apache.poi.hwpf.HWPFDocument.<init>(HWPFDocument.java:346) at
org.apache.tika.parser.microsoft.WordExtractor.parse(WordExtractor.java:81)
at
org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:201)
at
org.apache.tika.parser.microsoft.OfficeParser.parse(OfficeParser.java:172)
at
org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:256)
... 5 more Java Result: 1
what should I do?!!
I'm using commons-configuration 1.10 and would like to have my configuration file created only when needed.
For now, I have
XMLConfiguration config= new XMLConfiguration(file);
config.setReloadingStrategy(new FileChangedReloadingStrategy());
config.setAutoSave(true);
But, when I try to call
config.setProperty("portal.0.name", portal.getName());
I get
Caused by: org.apache.commons.configuration.ConfigurationException: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
at org.apache.commons.configuration.XMLConfiguration.createDocument(XMLConfiguration.java:914)
at org.apache.commons.configuration.XMLConfiguration.save(XMLConfiguration.java:1034)
at org.apache.commons.configuration.AbstractHierarchicalFileConfiguration$FileConfigurationDelegate.save(AbstractHierarchicalFileConfiguration.java:570)
at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:557)
at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:524)
at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:474)
at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:441)
at org.apache.commons.configuration.AbstractFileConfiguration.save(AbstractFileConfiguration.java:418)
at org.apache.commons.configuration.AbstractFileConfiguration.possiblySave(AbstractFileConfiguration.java:749)
... 29 more
Caused by: org.w3c.dom.DOMException: INVALID_CHARACTER_ERR: An invalid or illegal XML character is specified.
at org.apache.xerces.dom.CoreDocumentImpl.createElement(Unknown Source)
at org.apache.commons.configuration.XMLConfiguration$XMLBuilderVisitor.insert(XMLConfiguration.java:1529)
at org.apache.commons.configuration.HierarchicalConfiguration$BuilderVisitor.visitBeforeChildren(HierarchicalConfiguration.java:1734)
at org.apache.commons.configuration.HierarchicalConfiguration$Node.visit(HierarchicalConfiguration.java:1401)
at org.apache.commons.configuration.HierarchicalConfiguration$Node.visit(HierarchicalConfiguration.java:1407)
at org.apache.commons.configuration.XMLConfiguration$XMLBuilderVisitor.processDocument(XMLConfiguration.java:1504)
at org.apache.commons.configuration.XMLConfiguration.createDocument(XMLConfiguration.java:908)
... 37 more
Which seems to indicate file can't be saved by autosave mechanism.
So, is there something I do bad ?
And how can I create the configuration while creating the file only when needed (cause otherwise it will require some weird XML file copy)
I used portal.0.name where I should have used portal(0).name, which was solved by ... well ... reading the doc.
20:15:43 [INFO] macintosh264 issued server command: /sell hand
20:15:43 [INFO] [XYZShop] MacCommand sell executed
20:15:43 [SEVERE] null
org.bukkit.command.CommandException: Unhandled exception executing command 'sell' in plugin XYZShop v0.1.3
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:46)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:186)
at org.bukkit.craftbukkit.v1_4_6.CraftServer.dispatchCommand(CraftServer.java:510)
at net.minecraft.server.v1_4_6.PlayerConnection.handleCommand(PlayerConnection.java:979)
at net.minecraft.server.v1_4_6.PlayerConnection.chat(PlayerConnection.java:897)
at net.minecraft.server.v1_4_6.PlayerConnection.a(PlayerConnection.java:852)
at net.minecraft.server.v1_4_6.Packet3Chat.handle(Packet3Chat.java:44)
at net.minecraft.server.v1_4_6.NetworkManager.b(NetworkManager.java:290)
at net.minecraft.server.v1_4_6.PlayerConnection.d(PlayerConnection.java:112)
at net.minecraft.server.v1_4_6.ServerConnection.b(SourceFile:39)
at net.minecraft.server.v1_4_6.DedicatedServerConnection.b(SourceFile:30)
at net.minecraft.server.v1_4_6.MinecraftServer.r(MinecraftServer.java:598)
at net.minecraft.server.v1_4_6.DedicatedServer.r(DedicatedServer.java:224)
at net.minecraft.server.v1_4_6.MinecraftServer.q(MinecraftServer.java:494)
at net.minecraft.server.v1_4_6.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.v1_4_6.ThreadServerApplication.run(SourceFile:849)
Caused by: java.lang.NoSuchMethodError: dev.xyzcraft.net.database.DatabaseHandler.getItem(IS)Ldev/xyzcraft/net/xyzshop/dataObject/MSItem;
at dev.xyzcraft.net.xyzshop.commands.SellCommand.onCommand(SellCommand.java:63)
at dev.xyzcraft.net.xyzshop.util.MacCommand.onCommand(MacCommand.java:44)
at org.bukkit.command.PluginCommand.execute(PluginCommand.java:44)
... 15 more
I get that exception
here's the code:
https://github.com/macintosh264/XYZShop
Lastly, I'm using a Mod API for a popular video game, Minecraft, entitled Bukkit. Here's the JavaDoc, and library
http://dl.bukkit.org/downloads/bukkit/
http://jd.bukkit.org
"I also have this problem with another project that uses MySQL, and the stack trace occurs WHENEVER the mysql class is used. "
Macintosh264
It seems like whatever your trying to execute (i.e.the method that holds the command) isn't reading it properly. Try re-packaging your project, it's happened to me many times and that is usually an easy fix.